diff options
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp')
-rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp | 49 |
1 files changed, 20 insertions, 29 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp index 7bc8421bab2..6037127feb5 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp @@ -1108,35 +1108,26 @@ TEST(ConstructorDeclaration, IsExplicit) { } TEST(ConstructorDeclaration, Kinds) { - EXPECT_TRUE(matches( - "struct S { S(); };", - cxxConstructorDecl(isDefaultConstructor(), unless(isImplicit())))); - EXPECT_TRUE(notMatches( - "struct S { S(); };", - cxxConstructorDecl(isCopyConstructor(), unless(isImplicit())))); - EXPECT_TRUE(notMatches( - "struct S { S(); };", - cxxConstructorDecl(isMoveConstructor(), unless(isImplicit())))); - - EXPECT_TRUE(notMatches( - "struct S { S(const S&); };", - cxxConstructorDecl(isDefaultConstructor(), unless(isImplicit())))); - EXPECT_TRUE(matches( - "struct S { S(const S&); };", - cxxConstructorDecl(isCopyConstructor(), unless(isImplicit())))); - EXPECT_TRUE(notMatches( - "struct S { S(const S&); };", - cxxConstructorDecl(isMoveConstructor(), unless(isImplicit())))); - - EXPECT_TRUE(notMatches( - "struct S { S(S&&); };", - cxxConstructorDecl(isDefaultConstructor(), unless(isImplicit())))); - EXPECT_TRUE(notMatches( - "struct S { S(S&&); };", - cxxConstructorDecl(isCopyConstructor(), unless(isImplicit())))); - EXPECT_TRUE(matches( - "struct S { S(S&&); };", - cxxConstructorDecl(isMoveConstructor(), unless(isImplicit())))); + EXPECT_TRUE(matches("struct S { S(); };", + cxxConstructorDecl(isDefaultConstructor()))); + EXPECT_TRUE(notMatches("struct S { S(); };", + cxxConstructorDecl(isCopyConstructor()))); + EXPECT_TRUE(notMatches("struct S { S(); };", + cxxConstructorDecl(isMoveConstructor()))); + + EXPECT_TRUE(notMatches("struct S { S(const S&); };", + cxxConstructorDecl(isDefaultConstructor()))); + EXPECT_TRUE(matches("struct S { S(const S&); };", + cxxConstructorDecl(isCopyConstructor()))); + EXPECT_TRUE(notMatches("struct S { S(const S&); };", + cxxConstructorDecl(isMoveConstructor()))); + + EXPECT_TRUE(notMatches("struct S { S(S&&); };", + cxxConstructorDecl(isDefaultConstructor()))); + EXPECT_TRUE(notMatches("struct S { S(S&&); };", + cxxConstructorDecl(isCopyConstructor()))); + EXPECT_TRUE(matches("struct S { S(S&&); };", + cxxConstructorDecl(isMoveConstructor()))); } TEST(ConstructorDeclaration, IsUserProvided) { |