From 877e6a6fb05660a3cc3fc24bcbef4df5e4702423 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 8 Oct 2013 20:20:00 +0000 Subject: [PATCH] Explicitly request unsigned enum types when desired 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 | 2 +- include/clang/AST/Expr.h | 2 +- include/clang/Basic/SourceLocation.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/clang/AST/Comment.h b/include/clang/AST/Comment.h index ac3eafffee..28849f58a8 100644 --- a/include/clang/AST/Comment.h +++ b/include/clang/AST/Comment.h @@ -699,7 +699,7 @@ private: unsigned ParamIndex; public: - enum { + enum LLVM_ENUM_INT_TYPE(unsigned) { InvalidParamIndex = ~0U, VarArgParamIndex = ~0U/*InvalidParamIndex*/ - 1U }; diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index a53b88d613..9c8ad69dae 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -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 semantic, diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index 143beb67e0..10ae07b824 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -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: -- 2.40.0