]> granicus.if.org Git - clang/commitdiff
The destructor name should be matched to ~Foo instead of Foo.
authorAaron Ballman <aaron@aaronballman.com>
Mon, 18 Jan 2016 20:47:02 +0000 (20:47 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 18 Jan 2016 20:47:02 +0000 (20:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258077 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ASTMatchers/ASTMatchersTest.cpp

index 5fde0ff504f8303f69a7743c308a4e9296d612e3..1e5401d9bf3cf09da5fd625a896a9758d044a757 100644 (file)
@@ -1815,10 +1815,10 @@ TEST(IsExternC, MatchesExternCFunctionDeclarations) {
 }
 
 TEST(IsDefaulted, MatchesDefaultedFunctionDeclarations) {
-  EXPECT_TRUE(
-      notMatches("class A { ~A(); };", functionDecl(hasName("A"), isDefaulted())));
+  EXPECT_TRUE(notMatches("class A { ~A(); };",
+                         functionDecl(hasName("~A"), isDefaulted())));
   EXPECT_TRUE(matches("class B { ~B() = default; };",
-                      functionDecl(hasName("B"), isDefaulted())));
+                      functionDecl(hasName("~B"), isDefaulted())));
 }
 
 TEST(IsDeleted, MatchesDeletedFunctionDeclarations) {