Skip to content

Commit c8a12ed

Browse files
committed
[clang][NFC] Annotate CommentCommandTraits.h with preferred_type
This helps debuggers to display values in bit-fields in a more helpful way.
1 parent 0764254 commit c8a12ed

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

clang/include/clang/AST/CommentCommandTraits.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,52 +50,65 @@ struct CommandInfo {
5050
unsigned NumArgs : 4;
5151

5252
/// True if this command is a inline command (of any kind).
53+
LLVM_PREFERRED_TYPE(bool)
5354
unsigned IsInlineCommand : 1;
5455

5556
/// True if this command is a block command (of any kind).
57+
LLVM_PREFERRED_TYPE(bool)
5658
unsigned IsBlockCommand : 1;
5759

5860
/// True if this command is introducing a brief documentation
5961
/// paragraph (\or an alias).
62+
LLVM_PREFERRED_TYPE(bool)
6063
unsigned IsBriefCommand : 1;
6164

6265
/// True if this command is \\returns or an alias.
66+
LLVM_PREFERRED_TYPE(bool)
6367
unsigned IsReturnsCommand : 1;
6468

6569
/// True if this command is introducing documentation for a function
6670
/// parameter (\\param or an alias).
71+
LLVM_PREFERRED_TYPE(bool)
6772
unsigned IsParamCommand : 1;
6873

6974
/// True if this command is introducing documentation for
7075
/// a template parameter (\\tparam or an alias).
76+
LLVM_PREFERRED_TYPE(bool)
7177
unsigned IsTParamCommand : 1;
7278

7379
/// True if this command is \\throws or an alias.
80+
LLVM_PREFERRED_TYPE(bool)
7481
unsigned IsThrowsCommand : 1;
7582

7683
/// True if this command is \\deprecated or an alias.
84+
LLVM_PREFERRED_TYPE(bool)
7785
unsigned IsDeprecatedCommand : 1;
7886

7987
/// True if this is a \\headerfile-like command.
88+
LLVM_PREFERRED_TYPE(bool)
8089
unsigned IsHeaderfileCommand : 1;
8190

8291
/// True if we don't want to warn about this command being passed an empty
8392
/// paragraph. Meaningful only for block commands.
93+
LLVM_PREFERRED_TYPE(bool)
8494
unsigned IsEmptyParagraphAllowed : 1;
8595

8696
/// True if this command is a verbatim-like block command.
8797
///
8898
/// A verbatim-like block command eats every character (except line starting
8999
/// decorations) until matching end command is seen or comment end is hit.
100+
LLVM_PREFERRED_TYPE(bool)
90101
unsigned IsVerbatimBlockCommand : 1;
91102

92103
/// True if this command is an end command for a verbatim-like block.
104+
LLVM_PREFERRED_TYPE(bool)
93105
unsigned IsVerbatimBlockEndCommand : 1;
94106

95107
/// True if this command is a verbatim line command.
96108
///
97109
/// A verbatim-like line command eats everything until a newline is seen or
98110
/// comment end is hit.
111+
LLVM_PREFERRED_TYPE(bool)
99112
unsigned IsVerbatimLineCommand : 1;
100113

101114
/// True if this command contains a declaration for the entity being
@@ -105,20 +118,25 @@ struct CommandInfo {
105118
/// \code
106119
/// \fn void f(int a);
107120
/// \endcode
121+
LLVM_PREFERRED_TYPE(bool)
108122
unsigned IsDeclarationCommand : 1;
109123

110124
/// True if verbatim-like line command is a function declaration.
125+
LLVM_PREFERRED_TYPE(bool)
111126
unsigned IsFunctionDeclarationCommand : 1;
112127

113128
/// True if block command is further describing a container API; such
114129
/// as \@coclass, \@classdesign, etc.
130+
LLVM_PREFERRED_TYPE(bool)
115131
unsigned IsRecordLikeDetailCommand : 1;
116132

117133
/// True if block command is a container API; such as \@interface.
134+
LLVM_PREFERRED_TYPE(bool)
118135
unsigned IsRecordLikeDeclarationCommand : 1;
119136

120137
/// True if this command is unknown. This \c CommandInfo object was
121138
/// created during parsing.
139+
LLVM_PREFERRED_TYPE(bool)
122140
unsigned IsUnknownCommand : 1;
123141
};
124142

0 commit comments

Comments
 (0)