diff options
Diffstat (limited to 'tools/libclang/CIndexInclusionStack.cpp')
-rw-r--r-- | tools/libclang/CIndexInclusionStack.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/libclang/CIndexInclusionStack.cpp b/tools/libclang/CIndexInclusionStack.cpp index e0f4d42..6bc4f2e 100644 --- a/tools/libclang/CIndexInclusionStack.cpp +++ b/tools/libclang/CIndexInclusionStack.cpp @@ -40,14 +40,14 @@ void clang_getInclusions(CXTranslationUnit TU, CXInclusionVisitor CB, i = 0; for ( ; i < n ; ++i) { - - const SrcMgr::SLocEntry &SL = SM.getSLocEntry(i); + bool Invalid = false; + const SrcMgr::SLocEntry &SL = SM.getSLocEntry(i, &Invalid); - if (!SL.isFile()) + if (!SL.isFile() || Invalid) continue; const SrcMgr::FileInfo &FI = SL.getFile(); - if (!FI.getContentCache()->Entry) + if (!FI.getContentCache()->OrigEntry) continue; // Build the inclusion stack. @@ -61,7 +61,7 @@ void clang_getInclusions(CXTranslationUnit TU, CXInclusionVisitor CB, // Callback to the client. // FIXME: We should have a function to construct CXFiles. - CB((CXFile) FI.getContentCache()->Entry, + CB((CXFile) FI.getContentCache()->OrigEntry, InclusionStack.data(), InclusionStack.size(), clientData); } } |