[PATCH] D64762: [AST] Treat semantic form of InitListExpr as implicit code in traversals

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 15 16:18:07 PDT 2019


gribozavr added a comment.

Please add tests to `llvm/tools/clang/unittests/Tooling/RecursiveASTVisitorTests/`.



================
Comment at: clang/include/clang/AST/RecursiveASTVisitor.h:2332
       S->isSemanticForm() ? S->getSyntacticForm() : S, Queue));
   TRY_TO(TraverseSynOrSemInitListExpr(
       S->isSemanticForm() ? S : S->getSemanticForm(), Queue));
----------------
Instead of adding a whole new if statement, could you wrap the second existing TRY_TO in `if(shouldVisitImplicitCode())` ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64762





More information about the cfe-commits mailing list