[PATCH] D72531: Set traversal explicitly where needed in tests
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 17 04:15:39 PDT 2020
steveire marked an inline comment as done.
steveire added inline comments.
================
Comment at: clang/unittests/Tooling/StencilTest.cpp:63
ASTContext &Context = AstUnit->getASTContext();
- auto Matches = ast_matchers::match(wrapMatcher(Matcher), Context);
+ auto Matches = ast_matchers::match(
+ traverse(ast_type_traits::TK_AsIs, wrapMatcher(Matcher)), Context);
----------------
aaron.ballman wrote:
> Was this change made because you didn't want to accept the traversal mode as a parameter to `matchStmt` and force each caller to decide which mode they use? Or is there some other reason why this change was needed?
Yes, the test currently expects `AsIs`. If someone wanted to change that in the future, that is an issue for future work.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72531/new/
https://reviews.llvm.org/D72531
More information about the cfe-commits
mailing list