aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-10-22 22:19:00 +0000
committerTed Kremenek <kremenek@apple.com>2009-10-22 22:19:00 +0000
commit8ee1f3fc0d2467e7018131abe670662a8e6935c9 (patch)
tree4c320c1a85c79e15ec0e84bbdcc80e46e13f0aea
parent79162ce8caaf6d1f66666cdd52f677de812af47a (diff)
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84904 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/CIndex/CIndex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index cbc3085a27..64dfcfea51 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -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();