Skip to content

Commit d2812d2

Browse files
committed
[clang][NFC] Annotate Sema/Overload.h with preferred_type
This helps debuggers to display values in bit-fields in a more helpful way.
1 parent 4e16a75 commit d2812d2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

clang/include/clang/Sema/Overload.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,40 +278,50 @@ class Sema;
278278
/// Whether this is the deprecated conversion of a
279279
/// string literal to a pointer to non-const character data
280280
/// (C++ 4.2p2).
281+
LLVM_PREFERRED_TYPE(bool)
281282
unsigned DeprecatedStringLiteralToCharPtr : 1;
282283

283284
/// Whether the qualification conversion involves a change in the
284285
/// Objective-C lifetime (for automatic reference counting).
286+
LLVM_PREFERRED_TYPE(bool)
285287
unsigned QualificationIncludesObjCLifetime : 1;
286288

287289
/// IncompatibleObjC - Whether this is an Objective-C conversion
288290
/// that we should warn about (if we actually use it).
291+
LLVM_PREFERRED_TYPE(bool)
289292
unsigned IncompatibleObjC : 1;
290293

291294
/// ReferenceBinding - True when this is a reference binding
292295
/// (C++ [over.ics.ref]).
296+
LLVM_PREFERRED_TYPE(bool)
293297
unsigned ReferenceBinding : 1;
294298

295299
/// DirectBinding - True when this is a reference binding that is a
296300
/// direct binding (C++ [dcl.init.ref]).
301+
LLVM_PREFERRED_TYPE(bool)
297302
unsigned DirectBinding : 1;
298303

299304
/// Whether this is an lvalue reference binding (otherwise, it's
300305
/// an rvalue reference binding).
306+
LLVM_PREFERRED_TYPE(bool)
301307
unsigned IsLvalueReference : 1;
302308

303309
/// Whether we're binding to a function lvalue.
310+
LLVM_PREFERRED_TYPE(bool)
304311
unsigned BindsToFunctionLvalue : 1;
305312

306313
/// Whether we're binding to an rvalue.
314+
LLVM_PREFERRED_TYPE(bool)
307315
unsigned BindsToRvalue : 1;
308316

309317
/// Whether this binds an implicit object argument to a
310318
/// non-static member function without a ref-qualifier.
319+
LLVM_PREFERRED_TYPE(bool)
311320
unsigned BindsImplicitObjectArgumentWithoutRefQualifier : 1;
312321

313322
/// Whether this binds a reference to an object with a different
314323
/// Objective-C lifetime qualifier.
324+
LLVM_PREFERRED_TYPE(bool)
315325
unsigned ObjCLifetimeConversionBinding : 1;
316326

317327
/// FromType - The type that this conversion is converting
@@ -541,9 +551,11 @@ class Sema;
541551
};
542552

543553
/// ConversionKind - The kind of implicit conversion sequence.
554+
LLVM_PREFERRED_TYPE(Kind)
544555
unsigned ConversionKind : 31;
545556

546557
// Whether the initializer list was of an incomplete array.
558+
LLVM_PREFERRED_TYPE(bool)
547559
unsigned InitializerListOfIncompleteArray : 1;
548560

549561
/// When initializing an array or std::initializer_list from an
@@ -878,6 +890,7 @@ class Sema;
878890
CallExpr::ADLCallKind IsADLCandidate : 1;
879891

880892
/// Whether this is a rewritten candidate, and if so, of what kind?
893+
LLVM_PREFERRED_TYPE(OverloadCandidateRewriteKind)
881894
unsigned RewriteKind : 2;
882895

883896
/// FailureKind - The reason why this candidate is not viable.

0 commit comments

Comments
 (0)