Get rid of calls to lexer and unnecessary source location
transformations.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Add more cleaning.
getDeclAtPosition builds a SelectionTree underneath and it only operates on
spelling locations inside main file. So it is invalid to pass any expansion
locations to it.
There is no need to call getBeginningOfIdentifier for offsets being thrown at
SelectionTrees.
- Address comments
clang-tools-extra/clangd/XRefs.cpp | ||
---|---|---|
429 | also get rid of the bail-out when no tokens were touched. (which means we can now possibly trigger on ^~Foo().) | |
498 | ah thanks for catching this one especially, it also means we don't need to bail out when there are no identifiers touching cursor(it is only necessary for macros). |
clang-tools-extra/clangd/XRefs.cpp | ||
---|---|---|
429 | can I bother you to add a test for this (or some non-identifier case, assuming any works) |
used only once - inline?