[PATCH] D93988: [ASTMatchers] Make tests explicit about mode-dependence
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 4 13:39:25 PST 2021
steveire added a comment.
In D93988#2477602 <https://reviews.llvm.org/D93988#2477602>, @aaron.ballman wrote:
> Could you give me a bit more background about why you want to make this change?
This change makes it explicit so that we can see which tests work in only one mode, and if we want to change the default, this part is already compatible with the change.
But, this is not very important.
> There are tests which I would expect to match in any traversal mode (e.g., `EXPECT_TRUE(matches("class X {};", traverse(TK_AsIs, HasClassX)));`)
Given that
HasClassX = recordDecl(has(recordDecl(hasName("X"))))
which matches the implicit `RecordDecl` within the `RecordDecl`, it shouldn't match in `Ignore...` mode.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93988/new/
https://reviews.llvm.org/D93988
More information about the cfe-commits
mailing list