mirror of
https://github.com/MaskRay/ccls.git
synced 2025-08-18 04:32:24 +00:00
Set RetainCommentsFromSystemHeaders to true
Note with -fretain-comments-from-system-headers, the .gch of bits/stdc++.h becomes larger by 1%, but that is fine. Fix #373
This commit is contained in:
parent
64f9dbdc7a
commit
6710dbc2e9
@ -1238,8 +1238,8 @@ Index(SemaManager *manager, WorkingFiles *wfiles, VFS *vfs,
|
||||
ok = false;
|
||||
// -fparse-all-comments enables documentation in the indexer and in
|
||||
// code completion.
|
||||
if (g_config->index.comments > 1)
|
||||
CI->getLangOpts()->CommentOpts.ParseAllComments = true;
|
||||
CI->getLangOpts()->CommentOpts.ParseAllComments = g_config->index.comments > 1;
|
||||
CI->getLangOpts()->RetainCommentsFromSystemHeaders = true;
|
||||
std::string buf = wfiles->GetContent(main);
|
||||
std::vector<std::unique_ptr<llvm::MemoryBuffer>> Bufs;
|
||||
if (buf.size())
|
||||
|
@ -363,6 +363,7 @@ void BuildPreamble(Session &session, CompilerInvocation &CI,
|
||||
CI.getDiagnosticOpts().IgnoreWarnings = false;
|
||||
CI.getFrontendOpts().SkipFunctionBodies = true;
|
||||
CI.getLangOpts()->CommentOpts.ParseAllComments = g_config->index.comments > 1;
|
||||
CI.getLangOpts()->RetainCommentsFromSystemHeaders = true;
|
||||
|
||||
StoreDiags DC(task.path);
|
||||
IntrusiveRefCntPtr<DiagnosticsEngine> DE =
|
||||
|
Loading…
Reference in New Issue
Block a user