]> granicus.if.org Git - clang/commitdiff
Use 'unsigned' for enum bitfields
authorReid Kleckner <rnk@google.com>
Thu, 30 Mar 2017 01:12:08 +0000 (01:12 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 30 Mar 2017 01:12:08 +0000 (01:12 +0000)
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

include/clang/Basic/LangOptions.h

index e684ec1ba947683e519a6dfa6d2046887c73e2f8..20a0e584560206b60060b59189f8807d024fdfc3 100644 (file)
@@ -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.