forked from OSchip/llvm-project
parent
0d66d29678
commit
81e48b26bc
|
@ -2430,7 +2430,8 @@ designatorCountIs(2)
|
|||
|
||||
|
||||
<tr><td>Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1FieldDecl.html">FieldDecl</a>></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>
|
||||
|
||||
|
|
|
@ -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() &&
|
||||
|
|
Loading…
Reference in New Issue