diff options
author | Gabor Horvath <xazax.hun@gmail.com> | 2018-05-08 11:53:32 +0000 |
---|---|---|
committer | Gabor Horvath <xazax.hun@gmail.com> | 2018-05-08 11:53:32 +0000 |
commit | 3cd0aa3b7e87a2fbb9af945fb953992d1604a9cb (patch) | |
tree | c6c4c2e141aa57660355c869dde9ce2ed32ce4ce /clang/docs/LibASTMatchersReference.html | |
parent | d8e76494fc8754dd7c56492f36a59a9a0b4757aa (diff) | |
download | bcm5719-llvm-3cd0aa3b7e87a2fbb9af945fb953992d1604a9cb.tar.gz bcm5719-llvm-3cd0aa3b7e87a2fbb9af945fb953992d1604a9cb.zip |
[ASTMatchers] Overload isConstexpr for ifStmts
Differential Revision: https://reviews.llvm.org/D46233
llvm-svn: 331759
Diffstat (limited to 'clang/docs/LibASTMatchersReference.html')
-rw-r--r-- | clang/docs/LibASTMatchersReference.html | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index 78ddb14f95a..bc58e3d9a60 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -2789,15 +2789,19 @@ auto Y() -> int {} <tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html">FunctionDecl</a>></td><td class="name" onclick="toggle('isConstexpr1')"><a name="isConstexpr1Anchor">isConstexpr</a></td><td></td></tr> -<tr><td colspan="4" class="doc" id="isConstexpr1"><pre>Matches constexpr variable and function declarations. +<tr><td colspan="4" class="doc" id="isConstexpr1"><pre>Matches constexpr variable and function declarations, + and if constexpr. Given: constexpr int foo = 42; constexpr int bar(); + void baz() { if constexpr(1 > 0) {} } varDecl(isConstexpr()) matches the declaration of foo. functionDecl(isConstexpr()) matches the declaration of bar. +ifStmt(isConstexpr()) + matches the if statement in baz. </pre></td></tr> @@ -3039,6 +3043,23 @@ functionProtoType(parameterCountIs(3)) </pre></td></tr> +<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1IfStmt.html">IfStmt</a>></td><td class="name" onclick="toggle('isConstexpr2')"><a name="isConstexpr2Anchor">isConstexpr</a></td><td></td></tr> +<tr><td colspan="4" class="doc" id="isConstexpr2"><pre>Matches constexpr variable and function declarations, + and if constexpr. + +Given: + constexpr int foo = 42; + constexpr int bar(); + void baz() { if constexpr(1 > 0) {} } +varDecl(isConstexpr()) + matches the declaration of foo. +functionDecl(isConstexpr()) + matches the declaration of bar. +ifStmt(isConstexpr()) + matches the if statement in baz. +</pre></td></tr> + + <tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1IntegerLiteral.html">IntegerLiteral</a>></td><td class="name" onclick="toggle('equals6')"><a name="equals6Anchor">equals</a></td><td>bool Value</td></tr> <tr><td colspan="4" class="doc" id="equals6"><pre></pre></td></tr> @@ -3803,15 +3824,19 @@ int a; <tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>></td><td class="name" onclick="toggle('isConstexpr0')"><a name="isConstexpr0Anchor">isConstexpr</a></td><td></td></tr> -<tr><td colspan="4" class="doc" id="isConstexpr0"><pre>Matches constexpr variable and function declarations. +<tr><td colspan="4" class="doc" id="isConstexpr0"><pre>Matches constexpr variable and function declarations, + and if constexpr. Given: constexpr int foo = 42; constexpr int bar(); + void baz() { if constexpr(1 > 0) {} } varDecl(isConstexpr()) matches the declaration of foo. functionDecl(isConstexpr()) matches the declaration of bar. +ifStmt(isConstexpr()) + matches the if statement in baz. </pre></td></tr> |