[PATCH] D37200: [AST] Traverse CXXOperatorCallExpr in LexicallyOrderedRecursiveASTVisitor

Johannes Altmanninger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 28 04:04:35 PDT 2017


johannes added inline comments.


================
Comment at: include/clang/AST/LexicallyOrderedRecursiveASTVisitor.h:75
 
+  Derived &getDerived() { return *static_cast<Derived *>(this); }
+
----------------
arphaman wrote:
> I don't think you need this since `getDerived` in RecursiveASTVisitor is already public.
`has_same_member_pointer` and `getDerived` are used by the TRAVERSE_STMT macro, which should be the right one to use here.
Also the `RecursiveASTVisitor` typedef just above.


================
Comment at: include/clang/AST/RecursiveASTVisitor.h:3212
 #undef TRAVERSE_STMT
-#undef TRAVERSE_STMT_BASE
 
----------------
arphaman wrote:
> Getting rid of `undef` is not ideal. You might want to extract these macros into one .def file that's included by both RecursiveASTVisitor.h and the LexicallyOrdered one.
Ok, I will do that


https://reviews.llvm.org/D37200





More information about the cfe-commits mailing list