[cfe-commits] r84904 - /cfe/trunk/tools/CIndex/CIndex.cpp
Ted Kremenek
kremenek at apple.com
Thu Oct 22 15:19:00 PDT 2009
Author: kremenek
Date: Thu Oct 22 17:19:00 2009
New Revision: 84904
URL: http://llvm.org/viewvc/llvm-project?rev=84904&view=rev
Log:
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.
Modified:
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=84904&r1=84903&r2=84904&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Thu Oct 22 17:19:00 2009
@@ -380,7 +380,7 @@
CXXIdx->getOnlyLocalDecls(),
/* UseBumpAllocator = */ true);
- if (CXXIdx->getDisplayDiagnostics() && !ErrMsg.empty()) {
+ if (!ErrMsg.empty()) {
(llvm::errs() << "clang_createTranslationUnit: " << ErrMsg
<< '\n').flush();
}
@@ -444,7 +444,7 @@
/* 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();
More information about the cfe-commits
mailing list