Regenerate ASTMatchersReference without CRLF.

llvm-svn: 253654
This commit is contained in:
Benjamin Kramer 2015-11-20 07:57:46 +00:00
parent 611d33a5a2
commit 7d0cc23786
1 changed files with 139 additions and 139 deletions

View File

@ -1,103 +1,103 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>AST Matcher Reference</title>
<link type="text/css" rel="stylesheet" href="../menu.css" />
<link type="text/css" rel="stylesheet" href="../content.css" />
<style type="text/css">
td {
padding: .33em;
}
td.doc {
display: none;
border-bottom: 1px solid black;
}
td.name:hover {
color: blue;
cursor: pointer;
}
</style>
<script type="text/javascript">
function toggle(id) {
if (!id) return;
row = document.getElementById(id);
if (row.style.display != 'table-cell')
row.style.display = 'table-cell';
else
row.style.display = 'none';
}
</script>
</head>
<body onLoad="toggle(location.hash.substring(1, location.hash.length - 6))">
<!--#include virtual="../menu.html.incl"-->
<div id="content">
<h1>AST Matcher Reference</h1>
<p>This document shows all currently implemented matchers. The matchers are grouped
by category and node type they match. You can click on matcher names to show the
matcher's source documentation.</p>
<p>There are three different basic categories of matchers:
<ul>
<li><a href="#decl-matchers">Node Matchers:</a> Matchers that match a specific type of AST node.</li>
<li><a href="#narrowing-matchers">Narrowing Matchers:</a> Matchers that match attributes on AST nodes.</li>
<li><a href="#traversal-matchers">Traversal Matchers:</a> Matchers that allow traversal between AST nodes.</li>
</ul>
</p>
<p>Within each category the matchers are ordered by node type they match on.
Note that if a matcher can match multiple node types, it will it will appear
multiple times. This means that by searching for Matcher&lt;Stmt&gt; you can
find all matchers that can be used to match on Stmt nodes.</p>
<p>The exception to that rule are matchers that can match on any node. Those
are marked with a * and are listed in the beginning of each category.</p>
<p>Note that the categorization of matchers is a great help when you combine
them into matcher expressions. You will usually want to form matcher expressions
that read like english sentences by alternating between node matchers and
narrowing or traversal matchers, like this:
<pre>
recordDecl(hasDescendant(
ifStmt(hasTrueExpression(
expr(hasDescendant(
ifStmt()))))))
</pre>
</p>
<!-- ======================================================================= -->
<h2 id="decl-matchers">Node Matchers</h2>
<!-- ======================================================================= -->
<p>Node matchers are at the core of matcher expressions - they specify the type
of node that is expected. Every match expression starts with a node matcher,
which can then be further refined with a narrowing or traversal matcher. All
traversal matchers take node matchers as their arguments.</p>
<p>For convenience, all node matchers take an arbitrary number of arguments
and implicitly act as allOf matchers.</p>
<p>Node matchers are the only matchers that support the bind("id") call to
bind the matched node to the given string, to be later retrieved from the
match callback.</p>
<p>It is important to remember that the arguments to node matchers are
predicates on the same node, just with additional information about the type.
This is often useful to make matcher expression more readable by inlining bind
calls into redundant node matchers inside another node matcher:
<pre>
// This binds the CXXRecordDecl to "id", as the decl() matcher will stay on
// the same node.
recordDecl(decl().bind("id"), hasName("::MyClass"))
</pre>
</p>
<table>
<tr style="text-align:left"><th>Return type</th><th>Name</th><th>Parameters</th></tr>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>AST Matcher Reference</title>
<link type="text/css" rel="stylesheet" href="../menu.css" />
<link type="text/css" rel="stylesheet" href="../content.css" />
<style type="text/css">
td {
padding: .33em;
}
td.doc {
display: none;
border-bottom: 1px solid black;
}
td.name:hover {
color: blue;
cursor: pointer;
}
</style>
<script type="text/javascript">
function toggle(id) {
if (!id) return;
row = document.getElementById(id);
if (row.style.display != 'table-cell')
row.style.display = 'table-cell';
else
row.style.display = 'none';
}
</script>
</head>
<body onLoad="toggle(location.hash.substring(1, location.hash.length - 6))">
<!--#include virtual="../menu.html.incl"-->
<div id="content">
<h1>AST Matcher Reference</h1>
<p>This document shows all currently implemented matchers. The matchers are grouped
by category and node type they match. You can click on matcher names to show the
matcher's source documentation.</p>
<p>There are three different basic categories of matchers:
<ul>
<li><a href="#decl-matchers">Node Matchers:</a> Matchers that match a specific type of AST node.</li>
<li><a href="#narrowing-matchers">Narrowing Matchers:</a> Matchers that match attributes on AST nodes.</li>
<li><a href="#traversal-matchers">Traversal Matchers:</a> Matchers that allow traversal between AST nodes.</li>
</ul>
</p>
<p>Within each category the matchers are ordered by node type they match on.
Note that if a matcher can match multiple node types, it will it will appear
multiple times. This means that by searching for Matcher&lt;Stmt&gt; you can
find all matchers that can be used to match on Stmt nodes.</p>
<p>The exception to that rule are matchers that can match on any node. Those
are marked with a * and are listed in the beginning of each category.</p>
<p>Note that the categorization of matchers is a great help when you combine
them into matcher expressions. You will usually want to form matcher expressions
that read like english sentences by alternating between node matchers and
narrowing or traversal matchers, like this:
<pre>
recordDecl(hasDescendant(
ifStmt(hasTrueExpression(
expr(hasDescendant(
ifStmt()))))))
</pre>
</p>
<!-- ======================================================================= -->
<h2 id="decl-matchers">Node Matchers</h2>
<!-- ======================================================================= -->
<p>Node matchers are at the core of matcher expressions - they specify the type
of node that is expected. Every match expression starts with a node matcher,
which can then be further refined with a narrowing or traversal matcher. All
traversal matchers take node matchers as their arguments.</p>
<p>For convenience, all node matchers take an arbitrary number of arguments
and implicitly act as allOf matchers.</p>
<p>Node matchers are the only matchers that support the bind("id") call to
bind the matched node to the given string, to be later retrieved from the
match callback.</p>
<p>It is important to remember that the arguments to node matchers are
predicates on the same node, just with additional information about the type.
This is often useful to make matcher expression more readable by inlining bind
calls into redundant node matchers inside another node matcher:
<pre>
// This binds the CXXRecordDecl to "id", as the decl() matcher will stay on
// the same node.
recordDecl(decl().bind("id"), hasName("::MyClass"))
</pre>
</p>
<table>
<tr style="text-align:left"><th>Return type</th><th>Name</th><th>Parameters</th></tr>
<!-- START_DECL_MATCHERS -->
<tr><td>Matcher&lt<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXCtorInitializer.html">CXXCtorInitializer</a>&gt;</td><td class="name" onclick="toggle('cxxCtorInitializer0')"><a name="cxxCtorInitializer0Anchor">cxxCtorInitializer</a></td><td>Matcher&lt<a href="http://clang.llvm.org/doxygen/classclang_1_1CXXCtorInitializer.html">CXXCtorInitializer</a>&gt;...</td></tr>
@ -1530,21 +1530,21 @@ variableArrayType()
matches "int c[a[0]]"
</pre></td></tr>
<!--END_DECL_MATCHERS -->
</table>
<!-- ======================================================================= -->
<h2 id="narrowing-matchers">Narrowing Matchers</h2>
<!-- ======================================================================= -->
<p>Narrowing matchers match certain attributes on the current node, thus
narrowing down the set of nodes of the current type to match on.</p>
<p>There are special logical narrowing matchers (allOf, anyOf, anything and unless)
which allow users to create more powerful match expressions.</p>
<table>
<tr style="text-align:left"><th>Return type</th><th>Name</th><th>Parameters</th></tr>
<!--END_DECL_MATCHERS -->
</table>
<!-- ======================================================================= -->
<h2 id="narrowing-matchers">Narrowing Matchers</h2>
<!-- ======================================================================= -->
<p>Narrowing matchers match certain attributes on the current node, thus
narrowing down the set of nodes of the current type to match on.</p>
<p>There are special logical narrowing matchers (allOf, anyOf, anything and unless)
which allow users to create more powerful match expressions.</p>
<table>
<tr style="text-align:left"><th>Return type</th><th>Name</th><th>Parameters</th></tr>
<!-- START_NARROWING_MATCHERS -->
<tr><td>Matcher&lt;*&gt;</td><td class="name" onclick="toggle('allOf0')"><a name="allOf0Anchor">allOf</a></td><td>Matcher&lt;*&gt;, ..., Matcher&lt;*&gt;</td></tr>
@ -2935,22 +2935,22 @@ unless(stmt(isInTemplateInstantiation()))
instantiation.
</pre></td></tr>
<!--END_NARROWING_MATCHERS -->
</table>
<!-- ======================================================================= -->
<h2 id="traversal-matchers">AST Traversal Matchers</h2>
<!-- ======================================================================= -->
<p>Traversal matchers specify the relationship to other nodes that are
reachable from the current node.</p>
<p>Note that there are special traversal matchers (has, hasDescendant, forEach and
forEachDescendant) which work on all nodes and allow users to write more generic
match expressions.</p>
<table>
<tr style="text-align:left"><th>Return type</th><th>Name</th><th>Parameters</th></tr>
<!--END_NARROWING_MATCHERS -->
</table>
<!-- ======================================================================= -->
<h2 id="traversal-matchers">AST Traversal Matchers</h2>
<!-- ======================================================================= -->
<p>Traversal matchers specify the relationship to other nodes that are
reachable from the current node.</p>
<p>Note that there are special traversal matchers (has, hasDescendant, forEach and
forEachDescendant) which work on all nodes and allow users to write more generic
match expressions.</p>
<table>
<tr style="text-align:left"><th>Return type</th><th>Name</th><th>Parameters</th></tr>
<!-- START_TRAVERSAL_MATCHERS -->
<tr><td>Matcher&lt;*&gt;</td><td class="name" onclick="toggle('eachOf0')"><a name="eachOf0Anchor">eachOf</a></td><td>Matcher&lt;*&gt;, ..., Matcher&lt;*&gt;</td></tr>
@ -4817,11 +4817,11 @@ NestedNameSpecifier-matcher matches.
QualType-matcher matches.
</pre></td></tr>
<!--END_TRAVERSAL_MATCHERS -->
</table>
</div>
</body>
</html>
<!--END_TRAVERSAL_MATCHERS -->
</table>
</div>
</body>
</html>