Also fixes a bug, resulting from directly using ND.getEndLoc() for end
location of the range. As ND.getEndLoc() points to the begining of the last
token, whereas it should point one past the end, since LSP ranges are half open
(exclusive on the end).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/XRefs.cpp | ||
---|---|---|
613 | I think you're trying to test if NameTok has the location you're searching for, but you'd need to check the partition point for equality. Couldn't you just do NameTokens = spelledForExpanded(expandedTokens(NameLoc))? |
I think you're trying to test if NameTok has the location you're searching for, but you'd need to check the partition point for equality.
Couldn't you just do NameTokens = spelledForExpanded(expandedTokens(NameLoc))?