objc: fixed enum type is supported in objc mode.
Fixes a bug where enumerator type is not this
fixed type. // rdar://10381507
llvm-svn: 143724
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 806608c..05f4870 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -9812,6 +9812,7 @@
unsigned NewWidth;
bool NewSign;
if (!getLangOptions().CPlusPlus &&
+ !Enum->isFixed() &&
isRepresentableIntegerValue(Context, InitVal, Context.IntTy)) {
NewTy = Context.IntTy;
NewWidth = IntWidth;