summaryrefslogtreecommitdiffstats
path: root/clang/docs/LibASTMatchersReference.html
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2016-07-06 18:25:16 +0000
committerAaron Ballman <aaron@aaronballman.com>2016-07-06 18:25:16 +0000
commit5c574341f505fbf489d1c6b848c13b7538d57dfe (patch)
treea3f0a2bdce49f4944f13fe95ec78582fdd89d9d9 /clang/docs/LibASTMatchersReference.html
parent78fa242ec20fd021db07ab1f527ac7b9830f5431 (diff)
downloadbcm5719-llvm-5c574341f505fbf489d1c6b848c13b7538d57dfe.tar.gz
bcm5719-llvm-5c574341f505fbf489d1c6b848c13b7538d57dfe.zip
Add AST matchers for handling bit-fields and narrowing based on their width.
llvm-svn: 274652
Diffstat (limited to 'clang/docs/LibASTMatchersReference.html')
-rw-r--r--clang/docs/LibASTMatchersReference.html29
1 files changed, 28 insertions, 1 deletions
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index fff5366775c..a8a47d5b54b 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -1453,7 +1453,7 @@ c and d.
Given
enum C { Green };
- enum S { Red };
+ enum class S { Red };
C c;
S s;
@@ -2418,6 +2418,33 @@ designatorCountIs(2)
</pre></td></tr>
+<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1FieldDecl.html">FieldDecl</a>&gt;</td><td class="name" onclick="toggle('hasBitWidth0')"><a name="hasBitWidth0Anchor">hasBitWidth</a></td><td>unsigned Width</td></tr>
+<tr><td colspan="4" class="doc" id="hasBitWidth0"><pre>Matches non-static data members that are bit-fields.
+
+Given
+ class C {
+ int a : 2;
+ int b : 4;
+ int c : 2;
+ };
+fieldDecl(isBitField())
+ matches 'int a;' and 'int c;' but not 'int b;'.
+</pre></td></tr>
+
+
+<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1FieldDecl.html">FieldDecl</a>&gt;</td><td class="name" onclick="toggle('isBitField0')"><a name="isBitField0Anchor">isBitField</a></td><td></td></tr>
+<tr><td colspan="4" class="doc" id="isBitField0"><pre>Matches non-static data members that are bit-fields.
+
+Given
+ class C {
+ int a : 2;
+ int b;
+ };
+fieldDecl(isBitField())
+ matches 'int a;' but not 'int b;'.
+</pre></td></tr>
+
+
<tr><td>Matcher&lt;<a href="http://clang.llvm.org/doxygen/classclang_1_1FloatingLiteral.html">FloatingLiteral</a>&gt;</td><td class="name" onclick="toggle('equals1')"><a name="equals1Anchor">equals</a></td><td>ValueT Value</td></tr>
<tr><td colspan="4" class="doc" id="equals1"><pre>Matches literals that are equal to the given value.
OpenPOWER on IntegriCloud