[PATCH] D50958: [clangd] Implement findReferences function
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 4 11:58:05 PDT 2018
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks, looks good from my side.
================
Comment at: clangd/XRefs.cpp:328
+ : AST(AST) {
+ for (const Decl *D : TargetDecls)
+ Targets.insert(D);
----------------
nit: we can initialize TargetDecls like `Targets(TargetDecls.begin(), TargetDecls.end())`.
================
Comment at: clangd/XRefs.cpp:676
+ auto MainFileRefs = findRefs(Symbols.Decls, AST);
+ for (auto &Ref : MainFileRefs) {
+ Location Result;
----------------
nit: use `const auto &` indicating the variable is immutable.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50958
More information about the cfe-commits
mailing list