aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang-c/Index.h4
-rw-r--r--tools/libclang/CXSourceLocation.h2
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;
}