forked from OSchip/llvm-project
[clang][docs] Regenerate ASTMatchers documentation
This commit is contained in:
parent
7b196f1b09
commit
6f2c95657b
|
@ -2745,6 +2745,18 @@ unaryTransformType()
|
||||||
</pre></td></tr>
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>></td><td class="name" onclick="toggle('usingType0')"><a name="usingType0Anchor">usingType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingType.html">UsingType</a>>...</td></tr>
|
||||||
|
<tr><td colspan="4" class="doc" id="usingType0"><pre>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.
|
||||||
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>></td><td class="name" onclick="toggle('variableArrayType0')"><a name="variableArrayType0Anchor">variableArrayType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1VariableArrayType.html">VariableArrayType</a>>...</td></tr>
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>></td><td class="name" onclick="toggle('variableArrayType0')"><a name="variableArrayType0Anchor">variableArrayType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1VariableArrayType.html">VariableArrayType</a>>...</td></tr>
|
||||||
<tr><td colspan="4" class="doc" id="variableArrayType0"><pre>Matches C arrays with a specified size that is not an
|
<tr><td colspan="4" class="doc" id="variableArrayType0"><pre>Matches C arrays with a specified size that is not an
|
||||||
integer-constant-expression.
|
integer-constant-expression.
|
||||||
|
@ -4201,8 +4213,8 @@ auto Y() -> int {}
|
||||||
</pre></td></tr>
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html">FunctionDecl</a>></td><td class="name" onclick="toggle('isConsteval1')"><a name="isConsteval1Anchor">isConsteval</a></td><td></td></tr>
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html">FunctionDecl</a>></td><td class="name" onclick="toggle('isConsteval0')"><a name="isConsteval0Anchor">isConsteval</a></td><td></td></tr>
|
||||||
<tr><td colspan="4" class="doc" id="isConsteval1"><pre>Matches consteval function declarations and if consteval/if ! consteval
|
<tr><td colspan="4" class="doc" id="isConsteval0"><pre>Matches consteval function declarations and if consteval/if ! consteval
|
||||||
statements.
|
statements.
|
||||||
|
|
||||||
Given:
|
Given:
|
||||||
|
@ -4489,8 +4501,8 @@ functionProtoType(parameterCountIs(3))
|
||||||
</pre></td></tr>
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1IfStmt.html">IfStmt</a>></td><td class="name" onclick="toggle('isConsteval2')"><a name="isConsteval2Anchor">isConsteval</a></td><td></td></tr>
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1IfStmt.html">IfStmt</a>></td><td class="name" onclick="toggle('isConsteval1')"><a name="isConsteval1Anchor">isConsteval</a></td><td></td></tr>
|
||||||
<tr><td colspan="4" class="doc" id="isConsteval2"><pre>Matches consteval function declarations and if consteval/if ! consteval
|
<tr><td colspan="4" class="doc" id="isConsteval1"><pre>Matches consteval function declarations and if consteval/if ! consteval
|
||||||
statements.
|
statements.
|
||||||
|
|
||||||
Given:
|
Given:
|
||||||
|
@ -5633,7 +5645,7 @@ ifStmt(isConstexpr())
|
||||||
|
|
||||||
Given:
|
Given:
|
||||||
constinit int foo = 42;
|
constinit int foo = 42;
|
||||||
constinit const char* bar = "baz";
|
constinit const char* bar = "bar";
|
||||||
int baz = 42;
|
int baz = 42;
|
||||||
[[clang::require_constant_initialization]] int xyz = 42;
|
[[clang::require_constant_initialization]] int xyz = 42;
|
||||||
varDecl(isConstinit())
|
varDecl(isConstinit())
|
||||||
|
@ -7549,19 +7561,24 @@ varDecl(hasTypeLoc(templateSpecializationTypeLoc(hasTemplateArgumentLoc(0,
|
||||||
</pre></td></tr>
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DeclRefExpr.html">DeclRefExpr</a>></td><td class="name" onclick="toggle('throughUsingDecl0')"><a name="throughUsingDecl0Anchor">throughUsingDecl</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingShadowDecl.html">UsingShadowDecl</a>> InnerMatcher</td></tr>
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DeclRefExpr.html">DeclRefExpr</a>></td><td class="name" onclick="toggle('throughUsingDecl0')"><a name="throughUsingDecl0Anchor">throughUsingDecl</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingShadowDecl.html">UsingShadowDecl</a>> Inner</td></tr>
|
||||||
<tr><td colspan="4" class="doc" id="throughUsingDecl0"><pre>Matches a DeclRefExpr that refers to a declaration through a
|
<tr><td colspan="4" class="doc" id="throughUsingDecl0"><pre>Matches if a node refers to a declaration through a specific
|
||||||
specific using shadow declaration.
|
using shadow declaration.
|
||||||
|
|
||||||
Given
|
Examples:
|
||||||
namespace a { void f() {} }
|
namespace a { int f(); }
|
||||||
using a::f;
|
using a::f;
|
||||||
void g() {
|
int x = f();
|
||||||
f(); // Matches this ..
|
|
||||||
a::f(); // .. but not this.
|
|
||||||
}
|
|
||||||
declRefExpr(throughUsingDecl(anything()))
|
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<<a href="https://clang.llvm.org/doxygen/classclang_1_1DeclRefExpr.html">DeclRefExpr</a>>, Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingType.html">UsingType</a>>
|
||||||
</pre></td></tr>
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
@ -7651,7 +7668,7 @@ declaration of class D.
|
||||||
|
|
||||||
|
|
||||||
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DecltypeType.html">DecltypeType</a>></td><td class="name" onclick="toggle('hasUnderlyingType0')"><a name="hasUnderlyingType0Anchor">hasUnderlyingType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>></td></tr>
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DecltypeType.html">DecltypeType</a>></td><td class="name" onclick="toggle('hasUnderlyingType0')"><a name="hasUnderlyingType0Anchor">hasUnderlyingType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>></td></tr>
|
||||||
<tr><td colspan="4" class="doc" id="hasUnderlyingType0"><pre>Matches DecltypeType nodes to find out the underlying type.
|
<tr><td colspan="4" class="doc" id="hasUnderlyingType0"><pre>Matches DecltypeType or UsingType nodes to find the underlying type.
|
||||||
|
|
||||||
Given
|
Given
|
||||||
decltype(1) a = 1;
|
decltype(1) a = 1;
|
||||||
|
@ -7659,7 +7676,7 @@ Given
|
||||||
decltypeType(hasUnderlyingType(isInteger()))
|
decltypeType(hasUnderlyingType(isInteger()))
|
||||||
matches the type of "a"
|
matches the type of "a"
|
||||||
|
|
||||||
Usable as: Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DecltypeType.html">DecltypeType</a>>
|
Usable as: Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DecltypeType.html">DecltypeType</a>>, Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingType.html">UsingType</a>>
|
||||||
</pre></td></tr>
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
@ -9658,6 +9675,40 @@ usingDecl(hasAnyUsingShadowDecl(hasTargetDecl(functionDecl())))
|
||||||
matches using X::b but not using X::a </pre></td></tr>
|
matches using X::b but not using X::a </pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingType.html">UsingType</a>></td><td class="name" onclick="toggle('hasUnderlyingType1')"><a name="hasUnderlyingType1Anchor">hasUnderlyingType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>></td></tr>
|
||||||
|
<tr><td colspan="4" class="doc" id="hasUnderlyingType1"><pre>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<<a href="https://clang.llvm.org/doxygen/classclang_1_1DecltypeType.html">DecltypeType</a>>, Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingType.html">UsingType</a>>
|
||||||
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingType.html">UsingType</a>></td><td class="name" onclick="toggle('throughUsingDecl1')"><a name="throughUsingDecl1Anchor">throughUsingDecl</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingShadowDecl.html">UsingShadowDecl</a>> Inner</td></tr>
|
||||||
|
<tr><td colspan="4" class="doc" id="throughUsingDecl1"><pre>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<<a href="https://clang.llvm.org/doxygen/classclang_1_1DeclRefExpr.html">DeclRefExpr</a>>, Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1UsingType.html">UsingType</a>>
|
||||||
|
</pre></td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1ValueDecl.html">ValueDecl</a>></td><td class="name" onclick="toggle('hasType7')"><a name="hasType7Anchor">hasType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>> InnerMatcher</td></tr>
|
<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1ValueDecl.html">ValueDecl</a>></td><td class="name" onclick="toggle('hasType7')"><a name="hasType7Anchor">hasType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>> InnerMatcher</td></tr>
|
||||||
<tr><td colspan="4" class="doc" id="hasType7"><pre>Overloaded to match the declaration of the expression's or value
|
<tr><td colspan="4" class="doc" id="hasType7"><pre>Overloaded to match the declaration of the expression's or value
|
||||||
declaration's type.
|
declaration's type.
|
||||||
|
|
Loading…
Reference in New Issue