hokein added a comment. I think this is a reasonable fix, just a few comments on the test.
================ Comment at: clang/unittests/Tooling/RecursiveASTVisitorTests/InitListExprPreOrder.cpp:26 + bool TraverseConstructorInitializer(CXXCtorInitializer *Init) { + if (Init->getSourceLocation().isInvalid()) + InvalidLocsVisited = true; ---------------- there may be other reasons to cause an invalid source location. I think we can use the `Init->isWritten()` to verify the implicit initializer is being visited. ================ Comment at: clang/unittests/Tooling/RecursiveASTVisitorTests/InitListExprPreOrder.cpp:37 + bool InvalidLocsVisited = false; private: ---------------- maybe name it `VisitedImplicitInitializer`? ================ Comment at: clang/unittests/Tooling/RecursiveASTVisitorTests/InitListExprPreOrder.cpp:62 + std::vector<bool> Config{true, false}; + for (bool VisitImplCode : Config) { + InitListExprPreOrderVisitor Visitor(VisitImplCode); ---------------- nit: inline the Config. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65735/new/ https://reviews.llvm.org/D65735 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits