[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372859: [clangd] A helper to find explicit references and their names (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 221728. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. - s/Decl* S/Decl* D/g Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67826/new/ https://reviews.llvm.org/D67826 Files

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-25 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clang-tools-extra/clangd/FindTarget.h:103 +llvm::function_ref Out); +void findExplicitReferences(Decl *S, +

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I believe all comments were addressed. PTAL and let me know if I missed something. Comment at: clang-tools-extra/clangd/FindTarget.h:93 + /// in 'obj.foo'. + const Expr* MemberExprBase = nullptr; +}; kadircet wrote: > do we hav

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 221556. ilya-biryukov marked 8 inline comments as done. ilya-biryukov added a comment. - Remove ExprMemberBase - Add an overload for Decl* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67826/new/ https://

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 4 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.h:96 +}; +llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, ReferenceLoc R); + ilya-biryukov wrote: > kadircet wrote: > > Is this for tes

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 221522. ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. - Use DeclRefExpr::getFoundDecl, add a test - Update a comment - Remove redundant anon namespace declaration - Remove :wa - Do not filter-out macro references - Docume

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 9 inline comments as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:432 + Ref = ReferenceLoc{ + E->getQualifierLoc(), E->getNameInfo().getLoc(), {E->getDecl()}}; +} kadircet wr

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:376 + + // We prefer to return template instantiation, but fallback to template + // pattern if instantiation is not available. ilya-b

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 221345. ilya-biryukov marked 18 inline comments as done. ilya-biryukov added a comment. Herald added subscribers: jfb, mgrang. - Add simple tests - Address other comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Added some tests too. More tests for dependent constructs are still missing, but please take a look at what we have for now. Comment at: clang-tools-extra/clangd/FindTarget.cpp:373 + DeclRelation::TemplateInstantiation)) && +

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.h:93 + /// in 'obj.foo'. + const Expr* MemberExprBase = nullptr; +}; do we have any real use-case for this field? apart from "skipping instance members in define inline"? because t

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.h:115 +/// FIXME: extend to report location information about declaration names too. +void findExplicitReferences(Stmt *S, +llvm::function_ref Out); It mig

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Thanks this mostly LG, but I think we need some tests feel free to copy the ones in D66647 as a start point. But I believe coverage for this one is bigger, as this tries to figure-out all references, whereas the define-inline patch onl

[PATCH] D67826: [clangd] A helper to find explicit references and their names

2019-09-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Allows to simplify pending code tweaks: - the upcoming DefineInline tweak (D66647 ) - rem