usaxena95 added inline comments.
================ Comment at: clang-tools-extra/clangd/XRefs.cpp:1153 + Index->relations(Req, [&](const SymbolID &Subject, const Symbol &Object) { + if (auto Loc = symbolToLocation(Object, *MainFilePath)) + Results.References.push_back(*Loc); ---------------- hokein wrote: > `symbolToLocation` will prefer definition location over declaration location. > > there are a few options: > > 1) just return declaration location > 2) just return definition location > 3) return both > > in the find-implementaiton case, I think the declaration location is more? > interesting than the definition location, I would slightly prefer 1), what do > you think? You are right. I experienced this while playing with it in VSCode. Sorry to not explicitly mention this. I too prefer declaration in such case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91626/new/ https://reviews.llvm.org/D91626 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits