aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-21 16:56:38 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-21 16:56:38 +0000
commitacca41167ce78bb032906f6b1d2ced62efbe059a (patch)
tree02d23f0c47eedcf98d324a92db65872f1b137b03
parentcee5ec9df479994e4ba27fb65b7ded5bb5a980eb (diff)
[libclang] In visitPreprocessedEntitiesInRange we are interested in a file region
so translate the range to file locations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147058 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/libclang/CIndex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index a5b390a53a..525c5fc0f5 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -193,8 +193,8 @@ static bool visitPreprocessedEntitiesInRange(SourceRange R,
if (!Visitor.shouldVisitIncludedEntities()) {
// If the begin/end of the range lie in the same FileID, do the optimization
// where we skip preprocessed entities that do not come from the same FileID.
- FID = SM.getFileID(R.getBegin());
- if (FID != SM.getFileID(R.getEnd()))
+ FID = SM.getFileID(SM.getFileLoc(R.getBegin()));
+ if (FID != SM.getFileID(SM.getFileLoc(R.getEnd())))
FID = FileID();
}