diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-08 02:32:34 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-08 02:32:34 +0000 |
commit | ee2d5fd7a3bd42bce387db094d27a479617c3e67 (patch) | |
tree | 8ccc22174bc33506b543275f26e741b97ad11d79 /lib/Serialization/ASTReader.cpp | |
parent | 029c8f37e32b08bad4c757848a695d199fe5c813 (diff) |
[libclang] Introduce clang_findIncludesInFile, that can be used to retrieve all #import/#include directives in a specific file.
It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for
all the include directives in a particular file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 0389722bfd..4ad51e5dea 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -4000,7 +4000,7 @@ ASTReader::findBeginPreprocessedEntity(SourceLocation BLoc) const { GlobalSLocOffsetMapType::const_iterator SLocMapI = GlobalSLocOffsetMap.find(SourceManager::MaxLoadedOffset - - BLoc.getOffset()); + BLoc.getOffset() - 1); assert(SLocMapI != GlobalSLocOffsetMap.end() && "Corrupted global sloc offset map"); @@ -4048,7 +4048,7 @@ ASTReader::findEndPreprocessedEntity(SourceLocation ELoc) const { GlobalSLocOffsetMapType::const_iterator SLocMapI = GlobalSLocOffsetMap.find(SourceManager::MaxLoadedOffset - - ELoc.getOffset()); + ELoc.getOffset() - 1); assert(SLocMapI != GlobalSLocOffsetMap.end() && "Corrupted global sloc offset map"); |