summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/Indexing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/Indexing.cpp')
-rw-r--r--clang/tools/libclang/Indexing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/tools/libclang/Indexing.cpp b/clang/tools/libclang/Indexing.cpp
index 99fcdb692ad..7fb27bf258c 100644
--- a/clang/tools/libclang/Indexing.cpp
+++ b/clang/tools/libclang/Indexing.cpp
@@ -756,8 +756,10 @@ static void clang_indexTranslationUnit_Impl(void *UserData) {
unsigned index_options = ITUI->index_options;
ITUI->result = 1; // init as error.
- if (!TU)
+ if (isNotUseableTU(TU)) {
+ LOG_BAD_TU(TU);
return;
+ }
if (!client_index_callbacks || index_callbacks_size == 0)
return;
OpenPOWER on IntegriCloud