summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-02-04 14:29:47 +0000
committerDaniel Jasper <djasper@google.com>2015-02-04 14:29:47 +0000
commit774e6b55b39e7d14e242918be6648d0b85742b1a (patch)
tree52c59763efa0726e15e4cd022d93680470cc23dc /clang/unittests/ASTMatchers/ASTMatchersTest.cpp
parentaa748a8db551be46ea6a24b288b7972bcbd52068 (diff)
downloadbcm5719-llvm-774e6b55b39e7d14e242918be6648d0b85742b1a.tar.gz
bcm5719-llvm-774e6b55b39e7d14e242918be6648d0b85742b1a.zip
Rewrite r228138 to be somewhat saner.
While probably technically correct, the solution r228138 was quite hard to read/understand. This should be simpler. Also added a test to ensure that we are still visiting the syntactic form as well. llvm-svn: 228144
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 7325e065039..6485803a965 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -3148,6 +3148,8 @@ TEST(InitListExpression, MatchesInitListExpression) {
"void f();"
"S s[1] = { &f };",
declRefExpr(to(functionDecl(hasName("f"))))));
+ EXPECT_TRUE(
+ matches("int i[1] = {42, [0] = 43};", integerLiteral(equals(42))));
}
TEST(UsingDeclaration, MatchesUsingDeclarations) {
OpenPOWER on IntegriCloud