If the NewName is provided, prepareRename would perform a name validation.
The motivation is to allow our internal embedder to implement the customized
"canRenameInto" functionality on top of prepareRename.
Paths
| Differential D88881
[clangd] Add a NewName optional parameter to clangdServer::prepareRename. ClosedPublic Authored by hokein on Oct 6 2020, 2:25 AM.
Details Summary If the NewName is provided, prepareRename would perform a name validation. The motivation is to allow our internal embedder to implement the customized
Diff Detail
Event Timelinesammccall added inline comments.
This revision is now accepted and ready to land.Oct 6 2020, 2:46 AM Comment Actions Can you add a bit more context to the commit message? And should we expose this as an extension on textDocument/prepareRename? Comment Actions
no needed right now. AFAIK, there are no lsp clients that would use that.
Closed by commit rG9c09e2055ee4: [clangd] Add a NewName optional parameter to clangdServer::prepareRename. (authored by hokein). · Explain WhyOct 7 2020, 12:19 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 296768 clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/unittests/RenameTests.cpp
clang-tools-extra/clangd/unittests/SyncAPI.h
clang-tools-extra/clangd/unittests/SyncAPI.cpp
|
please make this optional rather than using "" as a sentinel value. The empty string is a plausible value here (though of course will always fail)