]> granicus.if.org Git - clang/commitdiff
Explicitly request unsigned enum types when desired
authorReid Kleckner <reid@kleckner.net>
Tue, 8 Oct 2013 20:20:00 +0000 (20:20 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 8 Oct 2013 20:20:00 +0000 (20:20 +0000)
This fixes repeated -Wmicrosoft warnings when self-hosting clang on
Windows, and gets us real unsigned enum types with MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192228 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Comment.h
include/clang/AST/Expr.h
include/clang/Basic/SourceLocation.h

index ac3eafffeeb054ebc6b2e9d5d8d65bcf49e498ca..28849f58a8ec75871fe132988e68ea14631088b1 100644 (file)
@@ -699,7 +699,7 @@ private:
   unsigned ParamIndex;
 
 public:
-  enum {
+  enum LLVM_ENUM_INT_TYPE(unsigned) {
     InvalidParamIndex = ~0U,
     VarArgParamIndex = ~0U/*InvalidParamIndex*/ - 1U
   };
index a53b88d61393c0f6afe63f0647fca5c4dbd6a467..9c8ad69dae1f5b83c5f0d453a953eb723529d9f1 100644 (file)
@@ -4621,7 +4621,7 @@ class PseudoObjectExpr : public Expr {
 public:
   /// NoResult - A value for the result index indicating that there is
   /// no semantic result.
-  enum { NoResult = ~0U };
+  enum LLVM_ENUM_INT_TYPE(unsigned) { NoResult = ~0U };
 
   static PseudoObjectExpr *Create(const ASTContext &Context, Expr *syntactic,
                                   ArrayRef<Expr*> semantic,
index 143beb67e0b763a4f5cc8d8a5734f9056a47bc08..10ae07b82498c52eed8cbb5a95f808e34dacbb0e 100644 (file)
@@ -89,7 +89,7 @@ class SourceLocation {
   friend class SourceManager;
   friend class ASTReader;
   friend class ASTWriter;
-  enum {
+  enum LLVM_ENUM_INT_TYPE(unsigned) {
     MacroIDBit = 1U << 31
   };
 public: