Use CastExpr::CK_ArrayToPointerDecay and fix an assert.

llvm-svn: 78502
This commit is contained in:
Anders Carlsson 2009-08-08 21:04:35 +00:00
parent 4a4e4487fc
commit 2c101b3cd1
2 changed files with 8 additions and 1 deletions

View File

@ -927,7 +927,7 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType,
case ICK_Array_To_Pointer:
FromType = Context.getArrayDecayedType(FromType);
ImpCastExprToType(From, FromType);
ImpCastExprToType(From, FromType, CastExpr::CK_ArrayToPointerDecay);
break;
case ICK_Function_To_Pointer:

View File

@ -0,0 +1,7 @@
// RUN: clang-cc %s -emit-llvm -o -
void f(const char*);
void g() {
f("hello");
}