summaryrefslogtreecommitdiffstats
path: root/docs/LibASTMatchersReference.html
diff options
context:
space:
mode:
authorShuai Wang <shuaiwang@google.com>2018-09-17 18:48:43 +0000
committerShuai Wang <shuaiwang@google.com>2018-09-17 18:48:43 +0000
commit926e91b0e6be63d21bd89ea9a1cc5ca17d0f3528 (patch)
treeeb943321f0caa886526409f417f47fe27c1c2e52 /docs/LibASTMatchersReference.html
parentf98dc5ceb32e4482f4d89194a3808dc61d7da49f (diff)
[ASTMatchers] Let isArrow also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52157 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342407 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LibASTMatchersReference.html')
-rw-r--r--docs/LibASTMatchersReference.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/LibASTMatchersReference.html b/docs/LibASTMatchersReference.html
index 68a1ab5915..f4557edbcf 100644
--- a/docs/LibASTMatchersReference.html
+++ b/docs/LibASTMatchersReference.html
@@ -2235,6 +2235,32 @@ cxxConstructorDecl(hasAnyConstructorInitializer(isWritten()))
</pre></td></tr>
+<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXDependentScopeMemberExpr.html">CXXDependentScopeMemberExpr</a>&gt;</td><td class="name" onclick="toggle('isArrow2')"><a name="isArrow2Anchor">isArrow</a></td><td></td></tr>
+<tr><td colspan="4" class="doc" id="isArrow2"><pre>Matches member expressions that are called with '-&gt;' as opposed
+to '.'.
+
+Member calls on the implicit this pointer match as called with '-&gt;'.
+
+Given
+ class Y {
+ void x() { this-&gt;x(); x(); Y y; y.x(); a; this-&gt;b; Y::b; }
+ template &lt;class T&gt; void f() { this-&gt;f&lt;T&gt;(); f&lt;T&gt;(); }
+ int a;
+ static int b;
+ };
+ template &lt;class T&gt;
+ class Z {
+ void x() { this-&gt;m; }
+ };
+memberExpr(isArrow())
+ matches this-&gt;x, x, y.x, a, this-&gt;b
+cxxDependentScopeMemberExpr(isArrow())
+ matches this-&gt;m
+unresolvedMemberExpr(isArrow())
+ matches this-&gt;f&lt;T&gt;, f&lt;T&gt;
+</pre></td></tr>
+
+
<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXMethodDecl.html">CXXMethodDecl</a>&gt;</td><td class="name" onclick="toggle('isConst0')"><a name="isConst0Anchor">isConst</a></td><td></td></tr>
<tr><td colspan="4" class="doc" id="isConst0"><pre>Matches if the given method declaration is const.
@@ -3228,11 +3254,20 @@ Member calls on the implicit this pointer match as called with '-&gt;'.
Given
class Y {
void x() { this-&gt;x(); x(); Y y; y.x(); a; this-&gt;b; Y::b; }
+ template &lt;class T&gt; void f() { this-&gt;f&lt;T&gt;(); f&lt;T&gt;(); }
int a;
static int b;
};
+ template &lt;class T&gt;
+ class Z {
+ void x() { this-&gt;m; }
+ };
memberExpr(isArrow())
matches this-&gt;x, x, y.x, a, this-&gt;b
+cxxDependentScopeMemberExpr(isArrow())
+ matches this-&gt;m
+unresolvedMemberExpr(isArrow())
+ matches this-&gt;f&lt;T&gt;, f&lt;T&gt;
</pre></td></tr>
@@ -3886,6 +3921,32 @@ Example matches a || b (matcher = binaryOperator(hasOperatorName("||")))
</pre></td></tr>
+<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1UnresolvedMemberExpr.html">UnresolvedMemberExpr</a>&gt;</td><td class="name" onclick="toggle('isArrow1')"><a name="isArrow1Anchor">isArrow</a></td><td></td></tr>
+<tr><td colspan="4" class="doc" id="isArrow1"><pre>Matches member expressions that are called with '-&gt;' as opposed
+to '.'.
+
+Member calls on the implicit this pointer match as called with '-&gt;'.
+
+Given
+ class Y {
+ void x() { this-&gt;x(); x(); Y y; y.x(); a; this-&gt;b; Y::b; }
+ template &lt;class T&gt; void f() { this-&gt;f&lt;T&gt;(); f&lt;T&gt;(); }
+ int a;
+ static int b;
+ };
+ template &lt;class T&gt;
+ class Z {
+ void x() { this-&gt;m; }
+ };
+memberExpr(isArrow())
+ matches this-&gt;x, x, y.x, a, this-&gt;b
+cxxDependentScopeMemberExpr(isArrow())
+ matches this-&gt;m
+unresolvedMemberExpr(isArrow())
+ matches this-&gt;f&lt;T&gt;, f&lt;T&gt;
+</pre></td></tr>
+
+
<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1VarDecl.html">VarDecl</a>&gt;</td><td class="name" onclick="toggle('hasAutomaticStorageDuration0')"><a name="hasAutomaticStorageDuration0Anchor">hasAutomaticStorageDuration</a></td><td></td></tr>
<tr><td colspan="4" class="doc" id="hasAutomaticStorageDuration0"><pre>Matches a variable declaration that has automatic storage duration.