[ASTMatchers] Fix doc for hasBitWidth

llvm-svn: 290491
This commit is contained in:
Malcolm Parsons 2016-12-24 13:22:26 +00:00
parent 0d66d29678
commit 81e48b26bc
2 changed files with 6 additions and 4 deletions

View 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>

View 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() &&