summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
authorSzabolcs Sipos <szabolcs.sipos@ericsson.com>2015-05-07 14:24:22 +0000
committerSzabolcs Sipos <szabolcs.sipos@ericsson.com>2015-05-07 14:24:22 +0000
commit1d068bb25425cd80ff5692742001272125392079 (patch)
treea9d57ea6965bc114760269564a6fdec576f4b8e4 /clang/unittests/ASTMatchers/ASTMatchersTest.cpp
parent9c95013e8fd3aeccad4d9ab2bab208ed532f05ec (diff)
downloadbcm5719-llvm-1d068bb25425cd80ff5692742001272125392079.tar.gz
bcm5719-llvm-1d068bb25425cd80ff5692742001272125392079.zip
Adding new AST matcher: gnuNullExpr
It matches GNU __null expression. llvm-svn: 236731
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 46ddb8d0fb6..6f1cf3fe2c8 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -2144,6 +2144,10 @@ TEST(Matcher, NullPtrLiteral) {
EXPECT_TRUE(matches("int* i = nullptr;", nullPtrLiteralExpr()));
}
+TEST(Matcher, GNUNullExpr) {
+ EXPECT_TRUE(matches("int* i = __null;", gnuNullExpr()));
+}
+
TEST(Matcher, AsmStatement) {
EXPECT_TRUE(matches("void foo() { __asm(\"mov al, 2\"); }", asmStmt()));
}
OpenPOWER on IntegriCloud