[PATCH] D81019: Syntax tree: ignore implicit expressions at the top level of statements

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 3 01:36:03 PDT 2020


eduucaldas accepted this revision.
eduucaldas added inline comments.


================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:1048
+  syntax::Tree *ChildNode;
+  if (Expr *ChildExpr = dyn_cast<Expr>(Child)) {
+    // This is an expression in a statement position, consume the trailing
----------------
I thought this treatement of derived class should be done by RecursiveASTVisitor 
This is kinda the task of WalkUpFrom*, unfortunately WalkUpFromThis follows the order:
WalkUpFromBase;
VisitThis;

And we would've wanted the opposite order:
VisitThis
WalkUpFromBase



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81019





More information about the cfe-commits mailing list