diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-10-20 08:27:19 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-10-20 08:27:19 +0000 |
commit | 06ed2a5c948f9f1928dbf137073062a7dfd26abe (patch) | |
tree | 481e1a2de75c563020b81c87618422acfe8bb7d0 /clang/lib/Sema/SemaDecl.cpp | |
parent | 2cb87a9b8fb043fa0512669e40dab6f5bbd1cea4 (diff) | |
download | bcm5719-llvm-06ed2a5c948f9f1928dbf137073062a7dfd26abe.tar.gz bcm5719-llvm-06ed2a5c948f9f1928dbf137073062a7dfd26abe.zip |
Remove default argument for ImpCastExprToType. Add appropriate argument
to all callers. Switch a few other users of CK_Unknown to proper cast
kinds.
Note that there are still some situations where we end up with
CK_Unknown; they're pretty easy to find with grep. There
are still a few missing conversion kinds, specifically
pointer/int/float->bool and the various combinations of real/complex
float/int->real/complex float/int.
llvm-svn: 84623
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 735b0b6a2ef..c95271149f1 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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) |