[PATCH] D68977: [clangd] Report declaration references in findExplicitReferences.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 04:38:58 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:415
 
 Optional<ReferenceLoc> refInDecl(const Decl *D) {
   struct Visitor : ConstDeclVisitor<Visitor> {
----------------
hokein wrote:
> ilya-biryukov wrote:
> > This should return `SmallVector<ReferenceLoc, 2>` now, some declarations can have both decl and non-decl references.
> Can you give some examples? It seems that non-decl references are handled by other `refIn*` functions.
> 
> ```
> int Foo = OtherBar; // OtherBar is captured at the momment.
> ```
```
namespace $1[[a]] = $2[[std]];
```

`$1` is a declaration of a namespace alias.
`$2` is a reference to namespace std.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68977/new/

https://reviews.llvm.org/D68977





More information about the cfe-commits mailing list