[PATCH] D81168: Add support for DeclRefExpr in SyntaxTree, by generating IdExpressions

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 18 10:19:24 PDT 2020


gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Tooling/Syntax/Nodes.cpp:182
+  for (auto *C = firstChild(); C; C = C->nextSibling()) {
+    if (C->role() == syntax::NodeRole::NestedNameSpecifier_specifier)
+      Children.push_back(llvm::cast<syntax::NameSpecifier>(C));
----------------
eduucaldas wrote:
> This should be an assert for now, as if that is not true it would be a logic problem. Same reasoning applies to `CompoundStatement`
Yep, feel free to change it to an assert.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81168





More information about the cfe-commits mailing list