forked from OSchip/llvm-project
Use hasSameType to compare types for equality.
llvm-svn: 122058
This commit is contained in:
parent
c950e77d1d
commit
77815438d1
|
@ -7745,7 +7745,8 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc,
|
|||
ECD->setInitVal(InitVal);
|
||||
|
||||
// Adjust the Expr initializer and type.
|
||||
if (ECD->getInitExpr() && NewTy != ECD->getInitExpr()->getType())
|
||||
if (ECD->getInitExpr() &&
|
||||
!Context.hasSameType(NewTy, ECD->getInitExpr()->getType()))
|
||||
ECD->setInitExpr(ImplicitCastExpr::Create(Context, NewTy,
|
||||
CK_IntegralCast,
|
||||
ECD->getInitExpr(),
|
||||
|
|
Loading…
Reference in New Issue