diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-11 22:29:47 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-01-11 22:29:47 +0000 |
commit | e2748288a04cda2e976a3fe859e4334afaf9274a (patch) | |
tree | dbe520f14c800e045ba29419516cf813055442e8 | |
parent | 814b51a3d572d4e4107e67d549c8a82484ce8160 (diff) |
[libclang] Add some constness in CXSourceLocation and CXSourceRange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172261 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang-c/Index.h | 4 | ||||
-rw-r--r-- | tools/libclang/CXSourceLocation.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 0214a7da6d..6fa8296bdf 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -342,7 +342,7 @@ CINDEX_LINKAGE CXFile clang_getFile(CXTranslationUnit tu, * to map a source location to a particular file, line, and column. */ typedef struct { - void *ptr_data[2]; + const void *ptr_data[2]; unsigned int_data; } CXSourceLocation; @@ -353,7 +353,7 @@ typedef struct { * starting and end locations from a source range, respectively. */ typedef struct { - void *ptr_data[2]; + const void *ptr_data[2]; unsigned begin_int_data; unsigned end_int_data; } CXSourceRange; diff --git a/tools/libclang/CXSourceLocation.h b/tools/libclang/CXSourceLocation.h index 735629d2c2..f97ac1f3af 100644 --- a/tools/libclang/CXSourceLocation.h +++ b/tools/libclang/CXSourceLocation.h @@ -32,7 +32,7 @@ translateSourceLocation(const SourceManager &SM, const LangOptions &LangOpts, if (Loc.isInvalid()) clang_getNullLocation(); - CXSourceLocation Result = { { (void*) &SM, (void*) &LangOpts, }, + CXSourceLocation Result = { { &SM, &LangOpts, }, Loc.getRawEncoding() }; return Result; } |