diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-10-31 23:33:56 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-10-31 23:33:56 +0000 |
commit | c311aba2474106673ad899b0e837fc6ec549d9a9 (patch) | |
tree | 25d1bf5ad933be3a97822957e2626c547f7ab046 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 3ab672d7ef53de2c98ee22d035cd380be9a4e358 (diff) | |
download | llvm-c311aba2474106673ad899b0e837fc6ec549d9a9.zip llvm-c311aba2474106673ad899b0e837fc6ec549d9a9.tar.gz llvm-c311aba2474106673ad899b0e837fc6ec549d9a9.tar.bz2 |
Silence a warning from MSVC "14" by making an enum unsigned
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.
llvm-svn: 221019
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 2c77832..a683e88 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -289,11 +289,11 @@ public: /// 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); } }; |