From 532870f537380552af50f603579913bf9dae1443 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Wed, 24 Jul 2013 05:46:07 +0000 Subject: [PATCH] Update docs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187022 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LibASTMatchersReference.html | 89 ++++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 8 deletions(-) diff --git a/docs/LibASTMatchersReference.html b/docs/LibASTMatchersReference.html index a3c6b13d45..3640736d53 100644 --- a/docs/LibASTMatchersReference.html +++ b/docs/LibASTMatchersReference.html @@ -100,6 +100,17 @@ recordDecl(decl().bind("id"), hasName("::MyClass")) Return typeNameParameters +Matcher<CXXCtorInitializer>ctorInitializerMatcher<CXXCtorInitializer>... +
Matches constructor initializers.
+
+Examples matches i(42).
+  class C {
+    C() : i(42) {}
+    int i;
+  };
+
+ + Matcher<Decl>accessSpecDeclMatcher<AccessSpecDecl>...
Matches C++ access specifier declarations.
 
@@ -209,6 +220,16 @@ fieldDecl()
 
+Matcher<Decl>friendDeclMatcher<FriendDecl>... +
Matches friend declarations.
+
+Given
+  class X { friend void foo(); };
+friendDecl()
+  matches 'friend void foo()'.
+
+ + Matcher<Decl>functionDeclMatcher<FunctionDecl>...
Matches function declarations.
 
@@ -276,6 +297,18 @@ Example matches X, Z
 
+Matcher<Decl>unresolvedUsingValueDeclMatcher<UnresolvedUsingValueDecl>... +
Matches unresolved using value declarations.
+
+Given
+  template<typename X>
+  class C : private X {
+    using X::x;
+  };
+unresolvedUsingValueDecl()
+  matches using X::x 
+ + Matcher<Decl>usingDeclMatcher<UsingDecl>...
Matches using declarations.
 
@@ -895,6 +928,16 @@ Example matches !a
 
+Matcher<Stmt>unresolvedConstructExprMatcher<CXXUnresolvedConstructExpr>... +
Matches unresolved constructor call expressions.
+
+Example matches T(t) in return statement of f
+    (matcher = unresolvedConstructExpr())
+  template <typename T>
+  void f(const T& t) { return T(t); }
+
+ + Matcher<Stmt>userDefinedLiteralMatcher<UserDefinedLiteral>...
Matches user defined literal operator call.
 
@@ -1177,6 +1220,16 @@ typedefType()
 
+Matcher<TypeLoc>unaryTransformTypeLocMatcher<UnaryTransformTypeLoc>... +
Matches types nodes representing unary type transformations.
+
+Given:
+  typedef __underlying_type(T) type;
+unaryTransformType()
+  matches "__underlying_type(T)"
+
+ + Matcher<TypeLoc>variableArrayTypeLocMatcher<VariableArrayTypeLoc>...
Matches C arrays with a specified size that is not an
 integer-constant-expression.
@@ -1456,6 +1509,16 @@ typedefType()
 
+Matcher<Type>unaryTransformTypeMatcher<UnaryTransformType>... +
Matches types nodes representing unary type transformations.
+
+Given:
+  typedef __underlying_type(T) type;
+unaryTransformType()
+  matches "__underlying_type(T)"
+
+ + Matcher<Type>variableArrayTypeMatcher<VariableArrayType>...
Matches C arrays with a specified size that is not an
 integer-constant-expression.
@@ -2542,6 +2605,16 @@ Usable as: Matcher<CXXConstructorDecl>forEachConstructorInitializerMatcher<CXXCtorInitializer> InnerMatcher
+
Matches each constructor initializer in a constructor definition.
+
+Given
+  class A { A() : i(42), j(42) {} int i; int j; };
+constructorDecl(forEachConstructorInitializer(forField(decl().bind("x"))))
+  will trigger two matches, binding for 'i' and 'j' respectively.
+
+ + Matcher<CXXConstructorDecl>hasAnyConstructorInitializerMatcher<CXXCtorInitializer> InnerMatcher
Matches a constructor initializer.
 
@@ -2600,7 +2673,7 @@ FIXME: Overload to allow directly matching types?
 

 
 
-Matcher<CXXMemberCallExpr>thisPointerTypeMatcher<Decl>  InnerMatcher
+Matcher<CXXMemberCallExpr>thisPointerTypeMatcher<Decl> InnerMatcher
 
Overloaded to match the type's declaration.
 
@@ -2663,7 +2736,7 @@ match Base.
-Matcher<CallExpr>calleeMatcher<Decl> InnerMatcher +Matcher<CallExpr>calleeMatcher<Decl> InnerMatcher
Matches if the call expression's callee's declaration matches the
 given matcher.
 
@@ -2989,8 +3062,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),
@@ -3404,12 +3477,12 @@ Usable as: Matcher<QualType>pointsToMatcher<Decl>  InnerMatcher
+Matcher<QualType>pointsToMatcher<Decl> InnerMatcher
 
Overloaded to match the pointee type's declaration.
 
-Matcher<QualType>referencesMatcher<Decl> InnerMatcher +Matcher<QualType>referencesMatcher<Decl> InnerMatcher
Overloaded to match the referenced type's declaration.
 
@@ -3586,8 +3659,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),
-- 
2.40.0