mirror of
https://github.com/MaskRay/ccls.git
synced 2025-08-20 05:32:23 +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;
|
ok = false;
|
||||||
// -fparse-all-comments enables documentation in the indexer and in
|
// -fparse-all-comments enables documentation in the indexer and in
|
||||||
// code completion.
|
// code completion.
|
||||||
if (g_config->index.comments > 1)
|
CI->getLangOpts()->CommentOpts.ParseAllComments = g_config->index.comments > 1;
|
||||||
CI->getLangOpts()->CommentOpts.ParseAllComments = true;
|
CI->getLangOpts()->RetainCommentsFromSystemHeaders = true;
|
||||||
std::string buf = wfiles->GetContent(main);
|
std::string buf = wfiles->GetContent(main);
|
||||||
std::vector<std::unique_ptr<llvm::MemoryBuffer>> Bufs;
|
std::vector<std::unique_ptr<llvm::MemoryBuffer>> Bufs;
|
||||||
if (buf.size())
|
if (buf.size())
|
||||||
|
@ -363,6 +363,7 @@ void BuildPreamble(Session &session, CompilerInvocation &CI,
|
|||||||
CI.getDiagnosticOpts().IgnoreWarnings = false;
|
CI.getDiagnosticOpts().IgnoreWarnings = false;
|
||||||
CI.getFrontendOpts().SkipFunctionBodies = true;
|
CI.getFrontendOpts().SkipFunctionBodies = true;
|
||||||
CI.getLangOpts()->CommentOpts.ParseAllComments = g_config->index.comments > 1;
|
CI.getLangOpts()->CommentOpts.ParseAllComments = g_config->index.comments > 1;
|
||||||
|
CI.getLangOpts()->RetainCommentsFromSystemHeaders = true;
|
||||||
|
|
||||||
StoreDiags DC(task.path);
|
StoreDiags DC(task.path);
|
||||||
IntrusiveRefCntPtr<DiagnosticsEngine> DE =
|
IntrusiveRefCntPtr<DiagnosticsEngine> DE =
|
||||||
|
Loading…
Reference in New Issue
Block a user