diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 735b0b6a2e..c95271149f 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3324,7 +3324,7 @@ void Sema::AddInitializerToDecl(DeclPtrTy dcl, ExprArg init, bool DirectInit) { << Init->getSourceRange(); VDecl->setInvalidDecl(); } else if (!VDecl->getType()->isDependentType()) - ImpCastExprToType(Init, VDecl->getType()); + ImpCastExprToType(Init, VDecl->getType(), CastExpr::CK_IntegralCast); } } } else if (VDecl->isFileVarDecl()) { @@ -5606,7 +5606,7 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc, // Adjust the Expr initializer and type. if (ECD->getInitExpr()) ECD->setInitExpr(new (Context) ImplicitCastExpr(NewTy, - CastExpr::CK_Unknown, + CastExpr::CK_IntegralCast, ECD->getInitExpr(), /*isLvalue=*/false)); if (getLangOptions().CPlusPlus) |