summaryrefslogtreecommitdiffstats
path: root/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2016-06-09 19:54:46 +0000
committerTim Shen <timshen91@gmail.com>2016-06-09 19:54:46 +0000
commite1fab5f94660fbb35c83e89efdae8b062a69d726 (patch)
treef8872f111129fa4a08cc75d04d1f4de729fa08d4 /unittests/ASTMatchers/ASTMatchersNodeTest.cpp
parent8617be2656f1974a15bc352a5f08eb57beafc489 (diff)
[Temporary] Add an ExprWithCleanups for each C++ MaterializeTemporaryExpr.
These ExprWithCleanups are added for holding a RunCleanupsScope not for destructor calls; rather, they are for lifetime marks. This requires ExprWithCleanups to keep a bit to indicate whether it have cleanups with side effects (e.g. dtor calls). Differential Revision: http://reviews.llvm.org/D20498 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ASTMatchers/ASTMatchersNodeTest.cpp')
-rw-r--r--unittests/ASTMatchers/ASTMatchersNodeTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersNodeTest.cpp b/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
index 4bbc0a4801..c659c6a002 100644
--- a/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
+++ b/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
@@ -999,8 +999,8 @@ TEST(ExprWithCleanups, MatchesExprWithCleanups) {
EXPECT_TRUE(matches("struct Foo { ~Foo(); };"
"const Foo f = Foo();",
varDecl(hasInitializer(exprWithCleanups()))));
- EXPECT_FALSE(matches("struct Foo { };"
- "const Foo f = Foo();",
+ EXPECT_FALSE(matches("struct Foo { }; Foo a;"
+ "const Foo f = a;",
varDecl(hasInitializer(exprWithCleanups()))));
}