aaron.ballman added inline comments.
================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5435-5442
+/// Matches two consecutive statements within a compound statement.
+///
+/// Given
+/// \code
+/// { if (x > 0) return true; return false; }
+/// \endcode
+/// compoundStmt(hasSubstatementSequence(ifStmt(), returnStmt()))
----------------
How do we extend this to support testing arbitrary sequences of statements? (If
this supports two statements, someone will find a need for three, etc).
================
Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:2636
+
+TEST_P(ASTMatchersTest, HasSubstatementSequenceComplex) {
+ const char *Text = R"code(
----------------
Some more complex-ish tests: can we match within function try or catch blocks
and GNU statement expressions?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116518/new/
https://reviews.llvm.org/D116518
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits