[cfe-commits] r172261 - in /cfe/trunk: include/clang-c/Index.h tools/libclang/CXSourceLocation.h
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Jan 11 14:29:47 PST 2013
Author: akirtzidis
Date: Fri Jan 11 16:29:47 2013
New Revision: 172261
URL: http://llvm.org/viewvc/llvm-project?rev=172261&view=rev
Log:
[libclang] Add some constness in CXSourceLocation and CXSourceRange.
Modified:
cfe/trunk/include/clang-c/Index.h
cfe/trunk/tools/libclang/CXSourceLocation.h
Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=172261&r1=172260&r2=172261&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Fri Jan 11 16:29:47 2013
@@ -342,7 +342,7 @@
* 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 @@
* 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;
Modified: cfe/trunk/tools/libclang/CXSourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXSourceLocation.h?rev=172261&r1=172260&r2=172261&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CXSourceLocation.h (original)
+++ cfe/trunk/tools/libclang/CXSourceLocation.h Fri Jan 11 16:29:47 2013
@@ -32,7 +32,7 @@
if (Loc.isInvalid())
clang_getNullLocation();
- CXSourceLocation Result = { { (void*) &SM, (void*) &LangOpts, },
+ CXSourceLocation Result = { { &SM, &LangOpts, },
Loc.getRawEncoding() };
return Result;
}
More information about the cfe-commits
mailing list