summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/index/IndexAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/index/IndexAction.cpp')
-rw-r--r--clang-tools-extra/clangd/index/IndexAction.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/index/IndexAction.cpp b/clang-tools-extra/clangd/index/IndexAction.cpp
index bda2cf44a58..120f6b0bae5 100644
--- a/clang-tools-extra/clangd/index/IndexAction.cpp
+++ b/clang-tools-extra/clangd/index/IndexAction.cpp
@@ -135,6 +135,11 @@ public:
bool BeginInvocation(CompilerInstance &CI) override {
// We want all comments, not just the doxygen ones.
CI.getLangOpts().CommentOpts.ParseAllComments = true;
+ // Index the whole file even if there are warnings and -Werror is set.
+ // Avoids some analyses too. Set in two places as we're late to the party.
+ CI.getDiagnosticOpts().IgnoreWarnings = true;
+ CI.getDiagnostics().setIgnoreAllWarnings(true);
+
return WrapperFrontendAction::BeginInvocation(CI);
}
OpenPOWER on IntegriCloud