diff options
Diffstat (limited to 'clang/unittests/ASTMatchers/Dynamic')
-rw-r--r-- | clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp index 8e97566f692..a1b6a93456d 100644 --- a/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp +++ b/clang/unittests/ASTMatchers/Dynamic/RegistryTest.cpp @@ -506,6 +506,12 @@ TEST_F(RegistryTest, HasArgs) { EXPECT_FALSE(matches("struct X {};", Value)); } +TEST_F(RegistryTest, ParenExpr) { + Matcher<Stmt> Value = constructMatcher("parenExpr").getTypedMatcher<Stmt>(); + EXPECT_TRUE(matches("int i = (1);", Value)); + EXPECT_FALSE(matches("int i = 1;", Value)); +} + } // end anonymous namespace } // end namespace dynamic } // end namespace ast_matchers |