nridge added inline comments.
================ Comment at: clang-tools-extra/clangd/XRefs.cpp:569 ASTResults = locateASTReferent(NearbyIdent->location(), NearbyIdent, AST, - *MainFilePath, Index); + *MainFilePath, Index, &IsDependentName); if (!ASTResults.empty()) ---------------- sammccall wrote: > the way the two (possible!) writes get combined is not obvious here. > > I'd suggest using two different variables and writing `IsDependent || > IsNearbyIdentDependent` in the usage below, if that's the intent. Good catch. There's actually no point letting this second `locateASTReferent()` call set `IsDependentName`, because `IsDependentName` only changes the outcome if the original location was an expanded token, but `findNearbyIdentifier()` bails in that case. So now I just pass nullptr instead. (We could work harder and make "comment referencing nearby dependent name" work, but I think that's enough of an edge that I didn't bother.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76451/new/ https://reviews.llvm.org/D76451 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits