ilya-biryukov added inline comments.
================
Comment at: clangd/XRefs.cpp:68
+ // declaration, and it could be a forward declaration.
+ auto Def = std::find_if(D->redecls_begin(), D->redecls_end(),
+ [](const Decl *D) { return IsDefinition(D); });
----------------
That seems like a useful helper on its own, maybe create a helper called `Decl*
getDefinition(Decl* D)` and use it instead?
It's implementation can be as short as the one we currently have for
`IsDefinition`, since all interesting `Decl` types have `getDefinition` method.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D41661
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits