One change: because there's no way to signal failure individually for
each cursor, we now "succeed" with an empty range with no parent if a
cursor doesn't point at anything.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Mostly looks good. Few nits. Thanks.
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
1193–1194 | You can remove this check now. | |
clang-tools-extra/clangd/ClangdServer.cpp | ||
671 | nit: return statement can be omitted. | |
clang-tools-extra/clangd/SemanticSelection.cpp | ||
65 | nit: s/Dummy/Empty ? | |
74 | nit:Range can be made a const ref. | |
clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp | ||
175 | I think it would be better to name the two points in the test and explicitly specify their order in the request (instead of relying on SourceAnnotations.points()). |
Address comments
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
1193–1194 | Oops! | |
clang-tools-extra/clangd/SemanticSelection.cpp | ||
74 | Oops, fixed to actually move. | |
clang-tools-extra/clangd/unittests/SemanticSelectionTests.cpp | ||
175 | Good point. I updated the documentation on Annotations instead to make this guarantee, this was always the intent. |
You can remove this check now.