aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceLocation.h
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-07-06 22:00:04 +0000
committerJordan Rose <jordan_rose@apple.com>2012-07-06 22:00:04 +0000
commit4a0beb20655ae9f28d519e088c6ec8dceec59edd (patch)
tree1e2b565f74eabf3f733934368ff92e0f4e4d25af /include/clang/Basic/SourceLocation.h
parent0e020adcb69e91826f4ee14a0c1d381f7b624a34 (diff)
Constify the argument to SourceLocation::getFromPtrEncoding.
This allows SourceLocations to be stored in generic "data" fields that are typed as "const void *" and are also used to point to const objects. Really we should probably be returning a const pointer from getPtrEncoding as well, but in some places we want to store SourceLocations in the same generic "data" field as proper pointers to /mutable/ objects. Oh well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r--include/clang/Basic/SourceLocation.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h
index 3bac26fbae..d6bba38563 100644
--- a/include/clang/Basic/SourceLocation.h
+++ b/include/clang/Basic/SourceLocation.h
@@ -166,7 +166,7 @@ public:
/// getFromPtrEncoding - Turn a pointer encoding of a SourceLocation object
/// into a real SourceLocation.
- static SourceLocation getFromPtrEncoding(void *Encoding) {
+ static SourceLocation getFromPtrEncoding(const void *Encoding) {
return getFromRawEncoding((unsigned)(uintptr_t)Encoding);
}