summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexHigh.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-09 00:17:49 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-09 00:17:49 +0000
commitfa469d0efd003aeb31d2fb06c22b547c22937a5a (patch)
tree2005913470764d299ba288507ba1fc5eb633b9e1 /clang/tools/libclang/CIndexHigh.cpp
parentc5dbeeadc16a0a762a076bd94d226f8c5127cdbb (diff)
downloadbcm5719-llvm-fa469d0efd003aeb31d2fb06c22b547c22937a5a.tar.gz
bcm5719-llvm-fa469d0efd003aeb31d2fb06c22b547c22937a5a.zip
[libclang] Make sure we don't try to handle a CXCursor_NoDeclFound
passed to clang_findReferencesInFile. llvm-svn: 146211
Diffstat (limited to 'clang/tools/libclang/CIndexHigh.cpp')
-rw-r--r--clang/tools/libclang/CIndexHigh.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndexHigh.cpp b/clang/tools/libclang/CIndexHigh.cpp
index bbb6d6dcadb..4eabefb9259 100644
--- a/clang/tools/libclang/CIndexHigh.cpp
+++ b/clang/tools/libclang/CIndexHigh.cpp
@@ -344,6 +344,11 @@ void clang_findReferencesInFile(CXCursor cursor, CXFile file,
llvm::errs() << "clang_findReferencesInFile: Null cursor\n";
return;
}
+ if (cursor.kind == CXCursor_NoDeclFound) {
+ if (Logging)
+ llvm::errs() << "clang_findReferencesInFile: Got CXCursor_NoDeclFound\n";
+ return;
+ }
if (!file) {
if (Logging)
llvm::errs() << "clang_findReferencesInFile: Null file\n";
OpenPOWER on IntegriCloud