================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:3356
@@ +3355,3 @@
+/// statement.
+AST_MATCHER_P(SwitchStmt, eachCase, internal::Matcher<SwitchCase>,
+ InnerMatcher) {
----------------
I'd prefer if we somehow find a different solution than having traversal
implemented in more matchers.
I think that with the upcoming backwards references, this can be expressed as:
switchStmt(
stmt().bind("x"),
forEachDescendant(
caseStmt(hasAcenstor(switchStmt(equalsBoundNode("x"))))
)
)
And while I'm not completely happy with the matcher, I think that'll buy us
time to come up with a better design for doing matchers like this (basically
getting early exit for forEachDescendant style matchers).
http://llvm-reviews.chandlerc.com/D744
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits