r201329 - Remove assert added in r201249.

Daniel Jasper djasper at google.com
Thu Feb 13 06:24:14 PST 2014


Author: djasper
Date: Thu Feb 13 08:24:14 2014
New Revision: 201329

URL: http://llvm.org/viewvc/llvm-project?rev=201329&view=rev
Log:
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.

Modified:
    cfe/trunk/tools/libclang/CIndex.cpp

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=201329&r1=201328&r2=201329&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Thu Feb 13 08:24:14 2014
@@ -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;
 }
 





More information about the cfe-commits mailing list