From 2b79910d8b5cb6ececab47dcb4333f7658e198e2 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 29 Jan 2016 18:24:34 +0000 Subject: 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 --- clang/docs/LibASTMatchersReference.html | 72 ++++----------------------------- 1 file changed, 8 insertions(+), 64 deletions(-) (limited to 'clang/docs/LibASTMatchersReference.html') diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index 93408e5776e..75deea40e13 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -1308,18 +1308,6 @@ c and d. -Matcher<Type>functionProtoTypeMatcher<FunctionProtoType>... -
Matches FunctionProtoType nodes.
-
-Given
-  int (*f)(int);
-  void g();
-functionProtoType()
-  matches "int (*f)(int)" and the type of "g" in C++ mode.
-  In C mode, "g" is not matched because it does not contain a prototype.
-
- - Matcher<Type>functionTypeMatcher<FunctionType>...
Matches FunctionType nodes.
 
@@ -2347,40 +2335,13 @@ compiled in C mode.
 
 
 Matcher<FunctionDecl>parameterCountIsunsigned N
-
Matches FunctionDecls and FunctionProtoTypes that have a
-specific parameter count.
-
-Given
-  void f(int i) {}
-  void g(int i, int j) {}
-  void h(int i, int j);
-  void j(int i);
-  void k(int x, int y, int z, ...);
-functionDecl(parameterCountIs(2))
-  matches void g(int i, int j) {}
-functionProtoType(parameterCountIs(2))
-  matches void h(int i, int j)
-functionProtoType(parameterCountIs(3))
-  matches void k(int x, int y, int z, ...);
-
- - -Matcher<FunctionProtoType>parameterCountIsunsigned N -
Matches FunctionDecls and FunctionProtoTypes that have a
-specific parameter count.
+
Matches FunctionDecls that have a specific parameter count.
 
 Given
   void f(int i) {}
   void g(int i, int j) {}
-  void h(int i, int j);
-  void j(int i);
-  void k(int x, int y, int z, ...);
 functionDecl(parameterCountIs(2))
-  matches void g(int i, int j) {}
-functionProtoType(parameterCountIs(2))
-  matches void h(int i, int j)
-functionProtoType(parameterCountIs(3))
-  matches void k(int x, int y, int z, ...);
+  matches g(int i, int j) {}
 
@@ -4034,8 +3995,8 @@ actual casts "explicit" casts.)
-Matcher<Expr>hasTypeMatcher<Decl> InnerMatcher -
Overloaded to match the declaration of the expression's or value
+Matcher<Expr>hasTypeMatcher<Decl> InnerMatcher
+
Overloaded to match the declaration of the expression's or value
 declaration's type.
 
 In case of a value declaration (for example a variable declaration),
@@ -4059,10 +4020,8 @@ matcher.
 
 Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
             and z (matcher = varDecl(hasType(cxxRecordDecl(hasName("X")))))
-            and U (matcher = typedefDecl(hasType(asString("int")))
  class X {};
  void y(X &x) { x; X z; }
- typedef int U;
 
@@ -4837,19 +4796,6 @@ Usable as: Any Matcher
-Matcher<TypedefDecl>hasTypeMatcher<QualType> InnerMatcher -
Matches if the expression's or declaration's type matches a type
-matcher.
-
-Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
-            and z (matcher = varDecl(hasType(cxxRecordDecl(hasName("X")))))
-            and U (matcher = typedefDecl(hasType(asString("int")))
- class X {};
- void y(X &x) { x; X z; }
- typedef int U;
-
- - Matcher<TypedefType>hasDeclarationMatcher<Decl> InnerMatcher
Matches a node if the declaration associated with that node
 matches the given matcher.
@@ -4935,8 +4881,8 @@ usingDecl(hasAnyUsingShadowDecl(hasTargetDecl(functionDecl())))
   matches using X::b but not using X::a 
-Matcher<ValueDecl>hasTypeMatcher<Decl> InnerMatcher -
Overloaded to match the declaration of the expression's or value
+Matcher<ValueDecl>hasTypeMatcher<Decl> InnerMatcher
+
Overloaded to match the declaration of the expression's or value
 declaration's type.
 
 In case of a value declaration (for example a variable declaration),
@@ -4954,16 +4900,14 @@ Usable as: Matcher<ValueDecl>hasTypeMatcher<QualType> InnerMatcher
-
Matches if the expression's or declaration's type matches a type
+Matcher<ValueDecl>hasTypeMatcher<QualType> InnerMatcher
+
Matches if the expression's or declaration's type matches a type
 matcher.
 
 Example matches x (matcher = expr(hasType(cxxRecordDecl(hasName("X")))))
             and z (matcher = varDecl(hasType(cxxRecordDecl(hasName("X")))))
-            and U (matcher = typedefDecl(hasType(asString("int")))
  class X {};
  void y(X &x) { x; X z; }
- typedef int U;
 
-- cgit v1.2.3