summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-02-13 14:24:14 +0000
committerDaniel Jasper <djasper@google.com>2014-02-13 14:24:14 +0000
commita238b17e764289def75d0410e85b40405507f42f (patch)
tree0c8b8efca441df86eecb12471130b4b19217eaec
parent3ef24c4f9a5b88d74741add729d2f654abe45878 (diff)
downloadbcm5719-llvm-a238b17e764289def75d0410e85b40405507f42f.tar.gz
bcm5719-llvm-a238b17e764289def75d0410e85b40405507f42f.zip
Remove assert added in r201249.
This triggers on one of our internal tests. Dmitri: I do not understand this part of the codebase well enough to locate the underlying cause easily. If the correct fix is not obvious, I can try to debug the problem further or try to come up with reduced test case. llvm-svn: 201329
-rw-r--r--clang/tools/libclang/CIndex.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 63acd0abd59..a74feabf06f 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -2826,8 +2826,12 @@ clang_parseTranslationUnit(CXIndex CIdx,
CIdx, source_filename, command_line_args, num_command_line_args,
unsaved_files, num_unsaved_files, options, &TU);
(void)Result;
- assert((TU && Result == CXError_Success) ||
- (!TU && Result != CXError_Success));
+
+ // FIXME: This probably papers over a problem. If the result is not success,
+ // no TU should be set.
+ if (Result != CXError_Success)
+ return 0;
+
return TU;
}
OpenPOWER on IntegriCloud