]> granicus.if.org Git - clang/commit
ObjC: Handle boolean fixed type for enum.
authorManman Ren <manman.ren@gmail.com>
Wed, 23 Mar 2016 16:28:28 +0000 (16:28 +0000)
committerManman Ren <manman.ren@gmail.com>
Wed, 23 Mar 2016 16:28:28 +0000 (16:28 +0000)
commitd71ad3f744a0de0c09ff624e6d5d5e605dbff22f
tree9df8ae61af3dadd01ade18fb60c818cda9660c66
parent7bebf4807d897a856c04c121ac3fd44e06e282fb
ObjC: Handle boolean fixed type for enum.

Before this commit, we assert failure in ImplicitCastExpr
"unheralded conversion to bool". This commit fixes the assertion by using
the correct cast type when the fixed type is boolean.

This commit also fixes the behavior for Microsoft mode as well, since
Obj-C and Microsoft mode share the same code path.

rdar://24999533

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264167 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/SemaObjC/enum-fixed-type.m