]> granicus.if.org Git - clang/commitdiff
[ASTMatchers] Fix doc for hasBitWidth
authorMalcolm Parsons <malcolm.parsons@gmail.com>
Sat, 24 Dec 2016 13:22:26 +0000 (13:22 +0000)
committerMalcolm Parsons <malcolm.parsons@gmail.com>
Sat, 24 Dec 2016 13:22:26 +0000 (13:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290491 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LibASTMatchersReference.html
include/clang/ASTMatchers/ASTMatchers.h

index 2a8d864c3c5c1a36f584c0a0c3129eb16267f6df..7745480c44c9fd3fa1058359ce4175fc1b52939e 100644 (file)
@@ -2430,7 +2430,8 @@ designatorCountIs(2)
 
 
 <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.
+<tr><td colspan="4" class="doc" id="hasBitWidth0"><pre>Matches non-static data members that are bit-fields of the specified
+bit width.
 
 Given
   class C {
@@ -2438,7 +2439,7 @@ Given
     int b : 4;
     int c : 2;
   };
-fieldDecl(isBitField())
+fieldDecl(hasBitWidth(2))
   matches 'int a;' and 'int c;' but not 'int b;'.
 </pre></td></tr>
 
index f2c649aca02e94dfd03d0936e9bf3021905f0619..efa606262b90153353b501039be35432dc79f58c 100644 (file)
@@ -533,7 +533,8 @@ AST_MATCHER(FieldDecl, isBitField) {
   return Node.isBitField();
 }
 
-/// \brief Matches non-static data members that are bit-fields.
+/// \brief Matches non-static data members that are bit-fields of the specified
+/// bit width.
 ///
 /// Given
 /// \code
@@ -543,7 +544,7 @@ AST_MATCHER(FieldDecl, isBitField) {
 ///     int c : 2;
 ///   };
 /// \endcode
-/// fieldDecl(isBitField())
+/// fieldDecl(hasBitWidth(2))
 ///   matches 'int a;' and 'int c;' but not 'int b;'.
 AST_MATCHER_P(FieldDecl, hasBitWidth, unsigned, Width) {
   return Node.isBitField() &&