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

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 1 04:17:23 PDT 2020


gribozavr2 marked an inline comment as done.
gribozavr2 added inline comments.


================
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:649
+  case BO_##NAME:                                                              \
+    if (isSameMethod(&RecursiveASTVisitor::TraverseBin##NAME,                  \
+                     &Derived::TraverseBin##NAME)) {                           \
----------------
eduucaldas wrote:
> 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
Unfortunately, we can't, because every call to `isSameMethod` has different arguments.


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