From: Reid Kleckner Date: Thu, 30 Mar 2017 01:12:08 +0000 (+0000) Subject: Use 'unsigned' for enum bitfields X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84aae4674ad086336f57847a72249a3d4907b24b;p=clang Use 'unsigned' for enum bitfields Fixes this clang warning on Windows: warning: implicit truncation from 'clang::LangOptions::FPContractModeKind' to bit-field changes value from 2 to -2 [-Wbitfield-constant-conversion] fp_contract = LangOptions::FPC_Fast; ^ ~~~~~~~~~~~~~~~~~~~~~ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299045 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h index e684ec1ba9..20a0e58456 100644 --- a/include/clang/Basic/LangOptions.h +++ b/include/clang/Basic/LangOptions.h @@ -224,7 +224,7 @@ public: private: /// Adjust BinaryOperator::FPFeatures to match the bit-field size of this. - LangOptions::FPContractModeKind fp_contract : 2; + unsigned fp_contract : 2; }; /// \brief Describes the kind of translation unit being processed.