aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-11-04 18:51:24 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-11-04 18:51:24 +0000
commit3b25216a47681e7957c0e9ec37a3cf445ab24743 (patch)
tree68da761085db276ee128282d2d4c6373b59cd614 /lib/Sema/SemaDecl.cpp
parent545d1bbf91c01e3d72e6e5074311ace6b3f86b26 (diff)
objc: fixed enum type is supported in objc mode.
Fixes a bug where enumerator type is not this fixed type. // rdar://10381507 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 806608cf43..05f48707aa 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -9812,6 +9812,7 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc,
unsigned NewWidth;
bool NewSign;
if (!getLangOptions().CPlusPlus &&
+ !Enum->isFixed() &&
isRepresentableIntegerValue(Context, InitVal, Context.IntTy)) {
NewTy = Context.IntTy;
NewWidth = IntWidth;