It says there is a narrowing conversion when we assign it to an unsigned
3 bit bitfield.
Also, use unsigned instead of size_t for the Size field of the struct in
question. Otherwise they won't run together in MSVC or clang-cl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221019
91177308-0d34-0410-b5e6-
96231b3b80d8
/// Header for data within LifetimeExtendedCleanupStack.
struct LifetimeExtendedCleanupHeader {
/// The size of the following cleanup object.
- size_t Size : 29;
+ unsigned Size : 29;
/// The kind of cleanup to push: a value from the CleanupKind enumeration.
unsigned Kind : 3;
- size_t getSize() const { return Size; }
+ size_t getSize() const { return size_t(Size); }
CleanupKind getKind() const { return static_cast<CleanupKind>(Kind); }
};
template <class T> struct DominatingValue<T*> : DominatingPointer<T> {};
-enum CleanupKind {
+enum CleanupKind : unsigned {
EHCleanup = 0x1,
NormalCleanup = 0x2,
NormalAndEHCleanup = EHCleanup | NormalCleanup,