kadircet added inline comments.
================ Comment at: clang-tools-extra/clangd/XRefs.cpp:432 auto References = findRefs( - getDeclAtPosition(AST, - SM.getMacroArgExpandedLocation(getBeginningOfIdentifier( - Pos, SM, AST.getLangOpts())), - Relations), - AST); + getDeclAtPosition(AST, IdentifierAtCursor->location(), Relations), AST); ---------------- sammccall wrote: > apparently we don't have tests for non-identifier cases, but they did work. > let's keep them working for now :) CurLoc here also get rid of the bail-out when no tokens were touched. (which means we can now possibly trigger on `^~Foo()`.) ================ Comment at: clang-tools-extra/clangd/XRefs.cpp:503 + auto Decls = + getDeclAtPosition(AST, IdentifierAtCursor->location(), Relations); ---------------- sammccall wrote: > again, CurLoc? 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). Updated it to do that, PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75166/new/ https://reviews.llvm.org/D75166 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits