[PATCH] D85439: [SyntaxTree] Expand support for `NestedNameSpecifier`

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 6 08:57:29 PDT 2020


eduucaldas created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
eduucaldas requested review of this revision.

We want NestedNameSpecifier syntax nodes to be generally supported, not
only for `DeclRefExpr` and `DependentScopedDeclRefExpr`.

To achieve this we:

- Use the `RecursiveASTVisitor`'s API to traverse

`NestedNameSpecifierLoc`s and automatically create its syntax nodes

- Add links from the `NestedNameSpecifierLoc`s to their syntax nodes.

In this way, from any semantic construct that has a `NestedNameSpecifier`,
we implicitly generate its syntax node via RAV and we can easily access
this syntax node via the links we added.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D85439

Files:
  clang/lib/Tooling/Syntax/BuildTree.cpp
  clang/unittests/Tooling/Syntax/TreeTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85439.283629.patch
Type: text/x-patch
Size: 6749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200806/505b35fd/attachment.bin>


More information about the cfe-commits mailing list