forked from OSchip/llvm-project
[clangd] Set RetainCommentsFromSystemHeaders to true
clangd should retain comments from system headers. fixes https://github.com/clangd/clangd/issues/96 Patch by lh123! Differential revision: https://reviews.llvm.org/D69928
This commit is contained in:
parent
6e8251046b
commit
0019684900
|
@ -63,6 +63,7 @@ buildCompilerInvocation(const ParseInputs &Inputs,
|
|||
// createInvocationFromCommandLine sets DisableFree.
|
||||
CI->getFrontendOpts().DisableFree = false;
|
||||
CI->getLangOpts()->CommentOpts.ParseAllComments = true;
|
||||
CI->getLangOpts()->RetainCommentsFromSystemHeaders = true;
|
||||
return CI;
|
||||
}
|
||||
|
||||
|
|
|
@ -160,6 +160,7 @@ public:
|
|||
bool BeginInvocation(CompilerInstance &CI) override {
|
||||
// We want all comments, not just the doxygen ones.
|
||||
CI.getLangOpts().CommentOpts.ParseAllComments = true;
|
||||
CI.getLangOpts().RetainCommentsFromSystemHeaders = 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;
|
||||
|
|
Loading…
Reference in New Issue