eduucaldas marked 2 inline comments as done.
eduucaldas added inline comments.


================
Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:190
+    return N->kind() == NodeKind::NameSpecifier;
+  }
+};
----------------
eduucaldas wrote:
> gribozavr2 wrote:
> > Should there be getters for various parts of the specifier?
> I think not.
Pospone to interface discussion with Yitzhak


================
Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:214
+    return N->kind() == NodeKind::UnqualifiedId;
+  }
+};
----------------
gribozavr2 wrote:
> Could you add TODOs about adding accessors?
Pospone to interface discussion with Yitzhak


================
Comment at: clang/lib/Tooling/Syntax/Nodes.cpp:178
 }
 
+std::vector<syntax::NameSpecifier *> syntax::NestedNameSpecifier::specifiers() 
{
----------------
I was thinking and our problem is bigger than not testing for `NodeRole`s, we 
don't test accessors at all!


================
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));
----------------
This should be an assert for now, as if that is not true it would be a logic 
problem. Same reasoning applies to `CompoundStatement`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81168



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to