summaryrefslogtreecommitdiffstats
path: root/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2016-01-29 18:24:34 +0000
committerHans Wennborg <hans@hanshq.net>2016-01-29 18:24:34 +0000
commit2b79910d8b5cb6ececab47dcb4333f7658e198e2 (patch)
tree8ebed9368af3bfa638257537d9ba6cc10af03d0f /clang/unittests/ASTMatchers/ASTMatchersTest.cpp
parentf3b9ba49419b9d541f639414eadfb0efd4e2a784 (diff)
downloadbcm5719-llvm-2b79910d8b5cb6ececab47dcb4333f7658e198e2.tar.gz
bcm5719-llvm-2b79910d8b5cb6ececab47dcb4333f7658e198e2.zip
Revert r259210 "Extend hasType narrowing matcher for TypedefDecls, add functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes."
It didn't pass check-clang. llvm-svn: 259218
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
index 073f2c50938..7fd933718fa 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp
@@ -1091,16 +1091,6 @@ TEST(HasType, TakesDeclMatcherAndMatchesValueDecl) {
notMatches("class X {}; void y() { X *x; }", varDecl(hasType(ClassX))));
}
-TEST(HasType, MatchesTypedefDecl) {
- EXPECT_TRUE(matches("typedef int X;", typedefDecl(hasType(asString("int")))));
- EXPECT_TRUE(matches("typedef const int T;",
- typedefDecl(hasType(asString("const int")))));
- EXPECT_TRUE(notMatches("typedef const int T;",
- typedefDecl(hasType(asString("int")))));
- EXPECT_TRUE(matches("typedef int foo; typedef foo bar;",
- typedefDecl(hasType(asString("foo")), hasName("bar"))));
-}
-
TEST(HasTypeLoc, MatchesDeclaratorDecls) {
EXPECT_TRUE(matches("int x;",
varDecl(hasName("x"), hasTypeLoc(loc(asString("int"))))));
@@ -1573,9 +1563,6 @@ TEST(Function, MatchesFunctionDeclarations) {
functionDecl(isVariadic())));
EXPECT_TRUE(notMatches("void f();", functionDecl(isVariadic())));
EXPECT_TRUE(notMatchesC("void f();", functionDecl(isVariadic())));
- EXPECT_TRUE(matches("void f(...);", functionDecl(parameterCountIs(0))));
- EXPECT_TRUE(matchesC("void f();", functionDecl(parameterCountIs(0))));
- EXPECT_TRUE(matches("void f(int, ...);", functionDecl(parameterCountIs(1))));
}
TEST(FunctionTemplate, MatchesFunctionTemplateDeclarations) {
@@ -1732,7 +1719,6 @@ TEST(Matcher, ParameterCount) {
EXPECT_TRUE(matches("class X { void f(int i) {} };", Function1Arg));
EXPECT_TRUE(notMatches("void f() {}", Function1Arg));
EXPECT_TRUE(notMatches("void f(int i, int j, int k) {}", Function1Arg));
- EXPECT_TRUE(matches("void f(int i, ...) {};", Function1Arg));
}
TEST(Matcher, References) {
@@ -4461,15 +4447,6 @@ TEST(TypeMatching, MatchesFunctionTypes) {
EXPECT_TRUE(matches("void f(int i) {}", functionType()));
}
-TEST(TypeMatching, MatchesFunctionProtoTypes) {
- EXPECT_TRUE(matches("int (*f)(int);", functionProtoType()));
- EXPECT_TRUE(matches("void f(int i);", functionProtoType()));
- EXPECT_TRUE(matches("void f();", functionProtoType(parameterCountIs(0))));
- EXPECT_TRUE(notMatchesC("void f();", functionProtoType()));
- EXPECT_TRUE(
- matchesC("void f(void);", functionProtoType(parameterCountIs(0))));
-}
-
TEST(TypeMatching, MatchesParenType) {
EXPECT_TRUE(
matches("int (*array)[4];", varDecl(hasType(pointsTo(parenType())))));
@@ -5171,8 +5148,7 @@ TEST(IsInlineMatcher, IsInline) {
namespaceDecl(isInline(), hasName("m"))));
}
-// FIXME: Figure out how to specify paths so the following tests pass on
-// Windows.
+// FIXME: Figure out how to specify paths so the following tests pass on Windows.
#ifndef LLVM_ON_WIN32
TEST(Matcher, IsExpansionInMainFileMatcher) {
OpenPOWER on IntegriCloud