hokein 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); });
----------------
ilya-biryukov wrote:
> 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.
Good point!


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41661



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to