summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexInclusionStack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/CIndexInclusionStack.cpp')
-rw-r--r--clang/tools/libclang/CIndexInclusionStack.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/tools/libclang/CIndexInclusionStack.cpp b/clang/tools/libclang/CIndexInclusionStack.cpp
index 9ea901927f8..6bc4f2e776a 100644
--- a/clang/tools/libclang/CIndexInclusionStack.cpp
+++ b/clang/tools/libclang/CIndexInclusionStack.cpp
@@ -40,10 +40,10 @@ 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();
OpenPOWER on IntegriCloud