patch to do array-to-pointer conversion in a
statement-expression. // rdar: //8600553


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117479 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index f8c7a90..1f50b4e 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -7072,6 +7072,8 @@
     }
     if (Expr *LastExpr = dyn_cast<Expr>(LastStmt)) {
       Ty = LastExpr->getType();
+      if (Ty->isArrayType())
+        Ty = Context.getArrayDecayedType(Ty);
       if (!Ty->isDependentType() && !LastExpr->isTypeDependent()) {
         ExprResult Res = PerformCopyInitialization(
                             InitializedEntity::InitializeResult(LPLoc,