|
@@ -1730,6 +1730,29 @@ declCountIs(2)
|
|
|
</pre></td></tr>
|
|
|
|
|
|
|
|
|
+<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>></td><td class="name" onclick="toggle('equalsBoundNode1')"><a name="equalsBoundNode1Anchor">equalsBoundNode</a></td><td>std::string ID</td></tr>
|
|
|
+<tr><td colspan="4" class="doc" id="equalsBoundNode1"><pre>Matches if a node equals a previously bound node.
|
|
|
+
|
|
|
+Matches a node if it equals the node previously bound to ID.
|
|
|
+
|
|
|
+Given
|
|
|
+ class X { int a; int b; };
|
|
|
+recordDecl(
|
|
|
+ has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
|
|
|
+ has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))
|
|
|
+ matches the class X, as a and b have the same type.
|
|
|
+
|
|
|
+Note that when multiple matches are involved via forEach* matchers,
|
|
|
+equalsBoundNodes acts as a filter.
|
|
|
+For example:
|
|
|
+compoundStmt(
|
|
|
+ forEachDescendant(varDecl().bind("d")),
|
|
|
+ forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d"))))))
|
|
|
+will trigger a match for each combination of variable declaration
|
|
|
+and reference to that variable declaration within a compound statement.
|
|
|
+</pre></td></tr>
|
|
|
+
|
|
|
+
|
|
|
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>></td><td class="name" onclick="toggle('equalsNode0')"><a name="equalsNode0Anchor">equalsNode</a></td><td>Decl* Other</td></tr>
|
|
|
<tr><td colspan="4" class="doc" id="equalsNode0"><pre>Matches if a node equals another node.
|
|
|
|
|
@@ -1933,6 +1956,29 @@ callExpr(on(hasType(asString("class Y *"))))
|
|
|
</pre></td></tr>
|
|
|
|
|
|
|
|
|
+<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1QualType.html">QualType</a>></td><td class="name" onclick="toggle('equalsBoundNode3')"><a name="equalsBoundNode3Anchor">equalsBoundNode</a></td><td>std::string ID</td></tr>
|
|
|
+<tr><td colspan="4" class="doc" id="equalsBoundNode3"><pre>Matches if a node equals a previously bound node.
|
|
|
+
|
|
|
+Matches a node if it equals the node previously bound to ID.
|
|
|
+
|
|
|
+Given
|
|
|
+ class X { int a; int b; };
|
|
|
+recordDecl(
|
|
|
+ has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
|
|
|
+ has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))
|
|
|
+ matches the class X, as a and b have the same type.
|
|
|
+
|
|
|
+Note that when multiple matches are involved via forEach* matchers,
|
|
|
+equalsBoundNodes acts as a filter.
|
|
|
+For example:
|
|
|
+compoundStmt(
|
|
|
+ forEachDescendant(varDecl().bind("d")),
|
|
|
+ forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d"))))))
|
|
|
+will trigger a match for each combination of variable declaration
|
|
|
+and reference to that variable declaration within a compound statement.
|
|
|
+</pre></td></tr>
|
|
|
+
|
|
|
+
|
|
|
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1QualType.html">QualType</a>></td><td class="name" onclick="toggle('hasLocalQualifiers0')"><a name="hasLocalQualifiers0Anchor">hasLocalQualifiers</a></td><td></td></tr>
|
|
|
<tr><td colspan="4" class="doc" id="hasLocalQualifiers0"><pre>Matches QualType nodes that have local CV-qualifiers attached to
|
|
|
the node, not hidden within a typedef.
|
|
@@ -1977,6 +2023,29 @@ matches "a(int)", "b(long)", but not "c(double)".
|
|
|
</pre></td></tr>
|
|
|
|
|
|
|
|
|
+<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>></td><td class="name" onclick="toggle('equalsBoundNode0')"><a name="equalsBoundNode0Anchor">equalsBoundNode</a></td><td>std::string ID</td></tr>
|
|
|
+<tr><td colspan="4" class="doc" id="equalsBoundNode0"><pre>Matches if a node equals a previously bound node.
|
|
|
+
|
|
|
+Matches a node if it equals the node previously bound to ID.
|
|
|
+
|
|
|
+Given
|
|
|
+ class X { int a; int b; };
|
|
|
+recordDecl(
|
|
|
+ has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
|
|
|
+ has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))
|
|
|
+ matches the class X, as a and b have the same type.
|
|
|
+
|
|
|
+Note that when multiple matches are involved via forEach* matchers,
|
|
|
+equalsBoundNodes acts as a filter.
|
|
|
+For example:
|
|
|
+compoundStmt(
|
|
|
+ forEachDescendant(varDecl().bind("d")),
|
|
|
+ forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d"))))))
|
|
|
+will trigger a match for each combination of variable declaration
|
|
|
+and reference to that variable declaration within a compound statement.
|
|
|
+</pre></td></tr>
|
|
|
+
|
|
|
+
|
|
|
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>></td><td class="name" onclick="toggle('equalsNode1')"><a name="equalsNode1Anchor">equalsNode</a></td><td>Stmt* Other</td></tr>
|
|
|
<tr><td colspan="4" class="doc" id="equalsNode1"><pre>Matches if a node equals another node.
|
|
|
|
|
@@ -2000,6 +2069,29 @@ Usable as: Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1TagDec
|
|
|
</pre></td></tr>
|
|
|
|
|
|
|
|
|
+<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Type.html">Type</a>></td><td class="name" onclick="toggle('equalsBoundNode2')"><a name="equalsBoundNode2Anchor">equalsBoundNode</a></td><td>std::string ID</td></tr>
|
|
|
+<tr><td colspan="4" class="doc" id="equalsBoundNode2"><pre>Matches if a node equals a previously bound node.
|
|
|
+
|
|
|
+Matches a node if it equals the node previously bound to ID.
|
|
|
+
|
|
|
+Given
|
|
|
+ class X { int a; int b; };
|
|
|
+recordDecl(
|
|
|
+ has(fieldDecl(hasName("a"), hasType(type().bind("t")))),
|
|
|
+ has(fieldDecl(hasName("b"), hasType(type(equalsBoundNode("t"))))))
|
|
|
+ matches the class X, as a and b have the same type.
|
|
|
+
|
|
|
+Note that when multiple matches are involved via forEach* matchers,
|
|
|
+equalsBoundNodes acts as a filter.
|
|
|
+For example:
|
|
|
+compoundStmt(
|
|
|
+ forEachDescendant(varDecl().bind("d")),
|
|
|
+ forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d"))))))
|
|
|
+will trigger a match for each combination of variable declaration
|
|
|
+and reference to that variable declaration within a compound statement.
|
|
|
+</pre></td></tr>
|
|
|
+
|
|
|
+
|
|
|
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1UnaryExprOrTypeTraitExpr.html">UnaryExprOrTypeTraitExpr</a>></td><td class="name" onclick="toggle('ofKind0')"><a name="ofKind0Anchor">ofKind</a></td><td>UnaryExprOrTypeTrait Kind</td></tr>
|
|
|
<tr><td colspan="4" class="doc" id="ofKind0"><pre>Matches unary expressions of a certain kind.
|
|
|
|