diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-21 16:56:38 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-21 16:56:38 +0000 |
| commit | c09b854f6b9766596f1ce2b9feafb9655f20ea76 (patch) | |
| tree | d2648138d6788db5c2138d4e474a175111ef3eb2 | |
| parent | e841c901de45c187f799c464331996d014c90fcd (diff) | |
| download | bcm5719-llvm-c09b854f6b9766596f1ce2b9feafb9655f20ea76.tar.gz bcm5719-llvm-c09b854f6b9766596f1ce2b9feafb9655f20ea76.zip | |
[libclang] In visitPreprocessedEntitiesInRange we are interested in a file region
so translate the range to file locations.
llvm-svn: 147058
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index a5b390a53a4..525c5fc0f56 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/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(); } |

