This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Expose the rename LimitFiles option to the C++ API, NFC.
ClosedPublic

Authored by hokein on Feb 19 2020, 6:43 AM.

Diff Detail

Event Timeline

hokein created this revision.Feb 19 2020, 6:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2020, 6:43 AM
sammccall added inline comments.Feb 20 2020, 6:58 AM
clang-tools-extra/clangd/ClangdServer.h
147–148

rename is just a normal API call, why is this a server option rather than a parameter to rename()?
It probably needs to be a member in ClangdLSPServer though, like CodeCompleteOptions.

(WantFormat belongs in this struct, I think)

clang-tools-extra/clangd/refactor/Rename.h
30

This needs a comment.

Or combine with LimitFiles, so that 0 means no cross-file rename.

hokein updated this revision to Diff 245852.Feb 21 2020, 7:22 AM
hokein marked 2 inline comments as done.

address review comments - move the options to clangdServer::rename API

sammccall accepted this revision.Feb 21 2020, 7:37 AM
This revision is now accepted and ready to land.Feb 21 2020, 7:37 AM
hokein updated this revision to Diff 246640.Feb 26 2020, 12:24 AM

keep the old clangdServer::rename around temporarily to make internal integration life easier.

This revision was automatically updated to reflect the committed changes.