diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index 4c3916c0325c99..a3f57996a6fb25 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -2745,6 +2745,18 @@

Node Matchers

+Matcher<Type>usingTypeMatcher<UsingType>... +
Matches types specified through a using declaration.
+
+Given
+  namespace a { struct S {}; }
+  using a::S;
+  S s;
+
+usingType() matches the type of the variable declaration of s.
+
+ + Matcher<Type>variableArrayTypeMatcher<VariableArrayType>...
Matches C arrays with a specified size that is not an
 integer-constant-expression.
@@ -4201,8 +4213,8 @@ 

Narrowing Matchers

-Matcher<FunctionDecl>isConsteval -
Matches consteval function declarations and if consteval/if ! consteval
+Matcher<FunctionDecl>isConsteval
+
Matches consteval function declarations and if consteval/if ! consteval
 statements.
 
 Given:
@@ -4489,8 +4501,8 @@ 

Narrowing Matchers

-Matcher<IfStmt>isConsteval -
Matches consteval function declarations and if consteval/if ! consteval
+Matcher<IfStmt>isConsteval
+
Matches consteval function declarations and if consteval/if ! consteval
 statements.
 
 Given:
@@ -5633,7 +5645,7 @@ 

Narrowing Matchers

Given: constinit int foo = 42; - constinit const char* bar = "baz"; + constinit const char* bar = "bar"; int baz = 42; [[clang::require_constant_initialization]] int xyz = 42; varDecl(isConstinit()) @@ -7549,19 +7561,24 @@

AST Traversal Matchers

-Matcher<DeclRefExpr>throughUsingDeclMatcher<UsingShadowDecl> InnerMatcher -
Matches a DeclRefExpr that refers to a declaration through a
-specific using shadow declaration.
+Matcher<DeclRefExpr>throughUsingDeclMatcher<UsingShadowDecl> Inner
+
Matches if a node refers to a declaration through a specific
+using shadow declaration.
 
-Given
-  namespace a { void f() {} }
+Examples:
+  namespace a { int f(); }
   using a::f;
-  void g() {
-    f();     // Matches this ..
-    a::f();  // .. but not this.
-  }
+  int x = f();
 declRefExpr(throughUsingDecl(anything()))
-  matches f()
+  matches f
+
+  namespace a { class X{}; }
+  using a::X;
+  X x;
+typeLoc(loc(usingType(throughUsingDecl(anything()))))
+  matches X
+
+Usable as: Matcher<DeclRefExpr>, Matcher<UsingType>
 
@@ -7651,7 +7668,7 @@

AST Traversal Matchers

Matcher<DecltypeType>hasUnderlyingTypeMatcher<Type> -
Matches DecltypeType nodes to find out the underlying type.
+
Matches DecltypeType or UsingType nodes to find the underlying type.
 
 Given
   decltype(1) a = 1;
@@ -7659,7 +7676,7 @@ 

AST Traversal Matchers

decltypeType(hasUnderlyingType(isInteger())) matches the type of "a" -Usable as: Matcher<DecltypeType> +Usable as: Matcher<DecltypeType>, Matcher<UsingType>
@@ -9658,6 +9675,40 @@

AST Traversal Matchers

matches using X::b but not using X::a
+Matcher<UsingType>hasUnderlyingTypeMatcher<Type> +
Matches DecltypeType or UsingType nodes to find the underlying type.
+
+Given
+  decltype(1) a = 1;
+  decltype(2.0) b = 2.0;
+decltypeType(hasUnderlyingType(isInteger()))
+  matches the type of "a"
+
+Usable as: Matcher<DecltypeType>, Matcher<UsingType>
+
+ + +Matcher<UsingType>throughUsingDeclMatcher<UsingShadowDecl> Inner +
Matches if a node refers to a declaration through a specific
+using shadow declaration.
+
+Examples:
+  namespace a { int f(); }
+  using a::f;
+  int x = f();
+declRefExpr(throughUsingDecl(anything()))
+  matches f
+
+  namespace a { class X{}; }
+  using a::X;
+  X x;
+typeLoc(loc(usingType(throughUsingDecl(anything()))))
+  matches X
+
+Usable as: Matcher<DeclRefExpr>, Matcher<UsingType>
+
+ + Matcher<ValueDecl>hasTypeMatcher<Decl> InnerMatcher
Overloaded to match the declaration of the expression's or value
 declaration's type.