summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2015-08-11 20:42:00 +0000
committerAaron Ballman <aaron@aaronballman.com>2015-08-11 20:42:00 +0000
commited455d4062f1a47cd7f060989f85010c967595e5 (patch)
treea7d22900608d52d940ffd551bed4e3735778db46 /clang/unittests/ASTMatchers/ASTMatchersTest.cpp
parented483770b16cd62511f53eb40253da347c8164bb (diff)
downloadbcm5719-llvm-ed455d4062f1a47cd7f060989f85010c967595e5.tar.gz
bcm5719-llvm-ed455d4062f1a47cd7f060989f85010c967595e5.zip
Add an AST matcher to match member intializers of a CXXCtorInitializer.
llvm-svn: 244662
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 33832599911..d51a5e28b5e 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -2097,6 +2097,12 @@ TEST(HasAnyConstructorInitializer, IsBaseInitializer) {
EXPECT_TRUE(notMatches(Code, constructorDecl(allOf(
hasAnyConstructorInitializer(allOf(isBaseInitializer(), isWritten())),
hasName("D")))));
+ EXPECT_TRUE(matches(Code, constructorDecl(allOf(
+ hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())),
+ hasName("D")))));
+ EXPECT_TRUE(notMatches(Code, constructorDecl(allOf(
+ hasAnyConstructorInitializer(allOf(isMemberInitializer(), isWritten())),
+ hasName("E")))));
}
TEST(Matcher, NewExpression) {
OpenPOWER on IntegriCloud