sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, ioeric,
ilya-biryukov.
Herald added a project: clang.
- we don't record the warnings at all
- even when -Werror is set, we don't want to stop indexing for a warning
- this allows some analyses to be skipped which can save some CPU
https://github.com/clangd/clangd/issues/24
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D59935
Files:
clangd/index/IndexAction.cpp
Index: clangd/index/IndexAction.cpp
===================================================================
--- clangd/index/IndexAction.cpp
+++ clangd/index/IndexAction.cpp
@@ -135,6 +135,9 @@
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't set.
+ // Avoids some analyses too.
+ CI.getDiagnosticOpts().IgnoreWarnings = true;
return WrapperFrontendAction::BeginInvocation(CI);
}
Index: clangd/index/IndexAction.cpp
===================================================================
--- clangd/index/IndexAction.cpp
+++ clangd/index/IndexAction.cpp
@@ -135,6 +135,9 @@
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't set.
+ // Avoids some analyses too.
+ CI.getDiagnosticOpts().IgnoreWarnings = true;
return WrapperFrontendAction::BeginInvocation(CI);
}
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits