diff options
author | Clement Courbet <courbet@google.com> | 2018-11-22 14:26:33 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2018-11-22 14:26:33 +0000 |
commit | a6144db15fdfdd6a0895cec0d915a7d6f3edb697 (patch) | |
tree | 3fbca595e4caff6564a69801a62764bc7939035f /clang/unittests | |
parent | c022c51f89cd6bc5df9d06ea3e4dacf225429347 (diff) |
Revert rL347462 "[ASTMatchers] Add hasSideEffect() matcher."
Breaks some buildbots.
llvm-svn: 347463
Diffstat (limited to 'clang/unittests')
-rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp index 076d21a1f5ea..e37bcbeec1f3 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp +++ b/clang/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 |