This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Fix LineFoldingOnly flag is not propagated correctly to ClangdServer.
ClosedPublic

Authored by hokein on Sep 5 2022, 6:05 AM.

Details

Summary

The Opts.LineFoldingOnly must be set before the clangdServer
construction, otherwise this flag is always false when using clangd in VSCode.

Diff Detail

Event Timeline

hokein created this revision.Sep 5 2022, 6:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2022, 6:05 AM
Herald added a subscriber: arphaman. · View Herald Transcript
hokein requested review of this revision.Sep 5 2022, 6:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2022, 6:05 AM
usaxena95 accepted this revision.Sep 5 2022, 6:22 AM

Thanks. Sorry I missed this.

clang-tools-extra/clangd/ClangdLSPServer.cpp
487–497

I think we should do this after the Opts has been fully set to avoid the confusion

This revision is now accepted and ready to land.Sep 5 2022, 6:22 AM
hokein updated this revision to Diff 457972.Sep 5 2022, 6:44 AM
hokein marked an inline comment as done.

address comment: create the ClangdServer when Opts is fully initialized.

This revision was landed with ongoing or failed builds.Sep 5 2022, 6:58 AM
This revision was automatically updated to reflect the committed changes.