Skip to content

Commit 6a7cf80

Browse files
committed
[clang][NFC] Annotate Sema/ParsedAttr.h with preferred_type
This helps debuggers to display values in bit-fields in a more helpful way.
1 parent 425fd3e commit 6a7cf80

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clang/include/clang/Sema/ParsedAttr.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ struct AvailabilityData {
8282

8383
struct TypeTagForDatatypeData {
8484
ParsedType MatchingCType;
85+
LLVM_PREFERRED_TYPE(bool)
8586
unsigned LayoutCompatible : 1;
87+
LLVM_PREFERRED_TYPE(bool)
8688
unsigned MustBeNull : 1;
8789
};
8890
struct PropertyData {
@@ -149,33 +151,41 @@ class ParsedAttr final
149151
unsigned NumArgs : 16;
150152

151153
/// True if already diagnosed as invalid.
154+
LLVM_PREFERRED_TYPE(bool)
152155
mutable unsigned Invalid : 1;
153156

154157
/// True if this attribute was used as a type attribute.
158+
LLVM_PREFERRED_TYPE(bool)
155159
mutable unsigned UsedAsTypeAttr : 1;
156160

157161
/// True if this has the extra information associated with an
158162
/// availability attribute.
163+
LLVM_PREFERRED_TYPE(bool)
159164
unsigned IsAvailability : 1;
160165

161166
/// True if this has extra information associated with a
162167
/// type_tag_for_datatype attribute.
168+
LLVM_PREFERRED_TYPE(bool)
163169
unsigned IsTypeTagForDatatype : 1;
164170

165171
/// True if this has extra information associated with a
166172
/// Microsoft __delcspec(property) attribute.
173+
LLVM_PREFERRED_TYPE(bool)
167174
unsigned IsProperty : 1;
168175

169176
/// True if this has a ParsedType
177+
LLVM_PREFERRED_TYPE(bool)
170178
unsigned HasParsedType : 1;
171179

172180
/// True if the processing cache is valid.
181+
LLVM_PREFERRED_TYPE(bool)
173182
mutable unsigned HasProcessingCache : 1;
174183

175184
/// A cached value.
176185
mutable unsigned ProcessingCache : 8;
177186

178187
/// True if the attribute is specified using '#pragma clang attribute'.
188+
LLVM_PREFERRED_TYPE(bool)
179189
mutable unsigned IsPragmaClangAttribute : 1;
180190

181191
/// The location of the 'unavailable' keyword in an

0 commit comments

Comments
 (0)