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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201329
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
}