aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-11-22 14:26:33 +0000
committerClement Courbet <courbet@google.com>2018-11-22 14:26:33 +0000
commit0718def197e34c47a44c48592e9ea7b5d210b239 (patch)
tree4ddbb15b2f683458d52e0b42928768be5e3aabe3 /unittests
parentea98fe0936a1b9046fcd47a6ad37a7e757acea0d (diff)
Revert rL347462 "[ASTMatchers] Add hasSideEffect() matcher."
Breaks some buildbots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp b/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
index 076d21a1f5..e37bcbeec1 100644
--- a/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
+++ b/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp
@@ -2259,21 +2259,5 @@ TEST(Matcher, isMain) {
notMatches("int main2() {}", functionDecl(isMain())));
}
-TEST(Matcher, hasSideEffects) {
- EXPECT_TRUE(matches("void call();"
- "void f() { call(); }",
- expr(hasSideEffects())));
- EXPECT_TRUE(matches("void f(int& a) { a = 0; }", expr(hasSideEffects())));
- EXPECT_TRUE(
- matches("void f(volatile int a) { (void)a; }", expr(hasSideEffects())));
-
- EXPECT_TRUE(notMatches("void call();"
- "void f() { }",
- expr(hasSideEffects())));
- EXPECT_TRUE(
- notMatches("void f(int& a) { (void)a; }", expr(hasSideEffects())));
- EXPECT_TRUE(notMatches("void f(int a) { (void)a; }", expr(hasSideEffects())));
-}
-
} // namespace ast_matchers
} // namespace clang