[clangd] only ignore collected symbols if TU has uncompilable errors.

llvm-svn: 336260
This commit is contained in:
Eric Liu 2018-07-04 10:39:48 +00:00
parent 514ac22d8f
commit 156fca5d43
1 changed files with 4 additions and 3 deletions

View File

@ -84,9 +84,10 @@ public:
const auto &CI = getCompilerInstance();
if (CI.hasDiagnostics() &&
(CI.getDiagnosticClient().getNumErrors() > 0)) {
llvm::errs() << "Found errors in the translation unit. Igoring "
"collected symbols...\n";
CI.getDiagnostics().hasUncompilableErrorOccurred()) {
llvm::errs()
<< "Found uncompilable errors in the translation unit. Igoring "
"collected symbols...\n";
return;
}