diff options
author | David Greene <greened@obbligato.org> | 2013-01-15 22:09:49 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2013-01-15 22:09:49 +0000 |
commit | 3cfa5324ef1c5f75fe5e142bef8050aaf2f03704 (patch) | |
tree | fce7064724dd810d08aefb70c473d97f638cfaaa /tools | |
parent | 527ce9fb91cc462abfe88843d3b8addf6c0f7365 (diff) |
Fix Casting
Use const_cast<> to avoid a cast-away-const error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172564 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CXSourceLocation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libclang/CXSourceLocation.cpp b/tools/libclang/CXSourceLocation.cpp index a6a031edd8..2b3a300f0d 100644 --- a/tools/libclang/CXSourceLocation.cpp +++ b/tools/libclang/CXSourceLocation.cpp @@ -232,7 +232,7 @@ void clang_getExpansionLocation(CXSourceLocation location, } if (file) - *file = (void *)SM.getFileEntryForSLocEntry(sloc); + *file = const_cast<FileEntry *>(SM.getFileEntryForSLocEntry(sloc)); if (line) *line = SM.getExpansionLineNumber(ExpansionLoc); if (column) @@ -309,7 +309,7 @@ void clang_getSpellingLocation(CXSourceLocation location, return createNullLocation(file, line, column, offset); if (file) - *file = (void *)SM.getFileEntryForID(FID); + *file = const_cast<FileEntry *>(SM.getFileEntryForID(FID)); if (line) *line = SM.getLineNumber(FID, FileOffset); if (column) |