forked from OSchip/llvm-project
Always emit error diagnostics when an error occurs within clang_createTranslationUnit() and clang_createTranslationUnitFromSource(). These kind of errors are ones that shouldn't be missed.
llvm-svn: 84904
This commit is contained in:
parent
b5cd6233b1
commit
2a3ffa9658
|
@ -380,7 +380,7 @@ CXTranslationUnit clang_createTranslationUnit(
|
|||
CXXIdx->getOnlyLocalDecls(),
|
||||
/* UseBumpAllocator = */ true);
|
||||
|
||||
if (CXXIdx->getDisplayDiagnostics() && !ErrMsg.empty()) {
|
||||
if (!ErrMsg.empty()) {
|
||||
(llvm::errs() << "clang_createTranslationUnit: " << ErrMsg
|
||||
<< '\n').flush();
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ CXTranslationUnit clang_createTranslationUnitFromSourceFile(
|
|||
/* redirects */ !CXXIdx->getDisplayDiagnostics() ? &Redirects[0] : NULL,
|
||||
/* secondsToWait */ 0, /* memoryLimits */ 0, &ErrMsg);
|
||||
|
||||
if (CXXIdx->getDisplayDiagnostics() && !ErrMsg.empty()) {
|
||||
if (!ErrMsg.empty()) {
|
||||
llvm::errs() << "clang_createTranslationUnitFromSourceFile: " << ErrMsg
|
||||
<< '\n' << "Arguments: \n";
|
||||
for (std::vector<const char*>::iterator I = argv.begin(), E = argv.end();
|
||||
|
|
Loading…
Reference in New Issue