diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-07 22:21:05 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-07 22:21:05 +0000 |
commit | cdb61979755c1c0699c1ee25eede9a50bf94d29b (patch) | |
tree | 78e00601af867a118e51bf175c31ac60001a1226 /lib/Sema/SemaChecking.cpp | |
parent | 6ff0785f1e58fb2cfb702d2995d076c6648a9a13 (diff) |
More CastKind work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 949c33dfff..b35287aa31 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -383,7 +383,8 @@ bool Sema::SemaBuiltinAtomicOverloaded(CallExpr *TheCall) { // GCC does an implicit conversion to the pointer or integer ValType. This // can fail in some cases (1i -> int**), check for this error case now. - if (CheckCastTypes(Arg->getSourceRange(), ValType, Arg)) + CastExpr::CastKind Kind = CastExpr::CK_Unknown; + if (CheckCastTypes(Arg->getSourceRange(), ValType, Arg, Kind)) return true; // Okay, we have something that *can* be converted to the right type. Check @@ -392,8 +393,7 @@ bool Sema::SemaBuiltinAtomicOverloaded(CallExpr *TheCall) { // pass in 42. The 42 gets converted to char. This is even more strange // for things like 45.123 -> char, etc. // FIXME: Do this check. - ImpCastExprToType(Arg, ValType, CastExpr::CK_Unknown, - /*isLvalue=*/false); + ImpCastExprToType(Arg, ValType, Kind, /*isLvalue=*/false); TheCall->setArg(i+1, Arg); } |