aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();