r206545 - Fix a -Wmicrosoft warning on an unrepresentable enum

Reid Kleckner reid at kleckner.net
Thu Apr 17 18:21:55 PDT 2014


Author: rnk
Date: Thu Apr 17 20:21:55 2014
New Revision: 206545

URL: http://llvm.org/viewvc/llvm-project?rev=206545&view=rev
Log:
Fix a -Wmicrosoft warning on an unrepresentable enum

0x80000000 isn't representable as an int, which is the default enum
type.

Modified:
    cfe/trunk/include/clang/Sema/Sema.h

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=206545&r1=206544&r2=206545&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Thu Apr 17 20:21:55 2014
@@ -7083,13 +7083,13 @@ public:
     PSK_CodeSeg,
   };
 
-  enum PragmaSectionFlag {
+  enum PragmaSectionFlag : unsigned {
     PSF_None = 0,
     PSF_Read = 0x1,
     PSF_Write = 0x2,
     PSF_Execute = 0x4,
     PSF_Implicit = 0x8,
-    PSF_Invalid = 0x80000000,
+    PSF_Invalid = 0x80000000U,
   };
 
   struct SectionInfo {





More information about the cfe-commits mailing list