diff options
| author | Daniel Jasper <djasper@google.com> | 2012-10-01 15:05:34 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2012-10-01 15:05:34 +0000 |
| commit | 6f595397bc3c0c156b1f2a07282fa485171b65b6 (patch) | |
| tree | 4d41a94747614eb9b6ce726e7ccd4d156692ef48 | |
| parent | 5901e47e8f1bc708ccf796d33b852768c859b79b (diff) | |
| download | bcm5719-llvm-6f595397bc3c0c156b1f2a07282fa485171b65b6.tar.gz bcm5719-llvm-6f595397bc3c0c156b1f2a07282fa485171b65b6.zip | |
Fix ASTMatchersTests in configurations where
"#include <initializer_list>" is unavailable for whatever reason.
llvm-svn: 164944
| -rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp index 6698e4ecbc6..d8f5511d6da 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp @@ -811,8 +811,8 @@ TEST(Matcher, Lambda) { } TEST(Matcher, ForRange) { - EXPECT_TRUE(matches("#include <initializer_list>\n" - "void f() { for (auto &a : {1, 2, 3}); }", + EXPECT_TRUE(matches("int as[] = { 1, 2, 3 };" + "void f() { for (auto &a : as); }", forRangeStmt())); EXPECT_TRUE(notMatches("void f() { for (int i; i<5; ++i); }", forRangeStmt())); @@ -2006,8 +2006,8 @@ TEST(AstPolymorphicMatcherPMacro, Works) { TEST(For, FindsForLoops) { EXPECT_TRUE(matches("void f() { for(;;); }", forStmt())); EXPECT_TRUE(matches("void f() { if(true) for(;;); }", forStmt())); - EXPECT_TRUE(notMatches("#include <initializer_list>\n" - "void f() { for (auto &a : {1, 2, 3}); }", + EXPECT_TRUE(notMatches("int as[] = { 1, 2, 3 };" + "void f() { for (auto &a : as); }", forStmt())); } |

