From 156fca5d430ed9611a1c8f34f3ecc773fbf246a9 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Wed, 4 Jul 2018 10:39:48 +0000 Subject: [clangd] only ignore collected symbols if TU has uncompilable errors. llvm-svn: 336260 --- .../clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang-tools-extra') diff --git a/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp b/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp index 1cfda579d7f..1082cf60d09 100644 --- a/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp +++ b/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp @@ -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; } -- cgit v1.2.1