[PATCH] D82787: Make RecursiveASTVisitor call WalkUpFrom for unary and binary operators in post-order traversal mode

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 22:43:10 PDT 2020


eduucaldas added inline comments.


================
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:649
+  case BO_##NAME:                                                              \
+    if (isSameMethod(&RecursiveASTVisitor::TraverseBin##NAME,                  \
+                     &Derived::TraverseBin##NAME)) {                           \
----------------
There's only one place that call PostVisitStmt. Could we pull this conditional there? It is repeated in every macro. It would make this function much simpler, and make clear at call site what is being done


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82787





More information about the cfe-commits mailing list