[libclang] In visitPreprocessedEntitiesInRange we are interested in a file region

so translate the range to file locations.

llvm-svn: 147058
This commit is contained in:
Argyrios Kyrtzidis 2011-12-21 16:56:38 +00:00
parent e841c901de
commit c09b854f6b
1 changed files with 2 additions and 2 deletions

View File

@ -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();
}