[cfe-commits] r147058 - /cfe/trunk/tools/libclang/CIndex.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Dec 21 08:56:39 PST 2011
Author: akirtzidis
Date: Wed Dec 21 10:56:38 2011
New Revision: 147058
URL: http://llvm.org/viewvc/llvm-project?rev=147058&view=rev
Log:
[libclang] In visitPreprocessedEntitiesInRange we are interested in a file region
so translate the range to file locations.
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=147058&r1=147057&r2=147058&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Wed Dec 21 10:56:38 2011
@@ -193,8 +193,8 @@
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();
}
More information about the cfe-commits
mailing list