From 5d7aa7fa0ae5154c8ca7fe8851b0cafcf8d61700 Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 19 Jan 2010 22:33:45 +0000 Subject: The type of a compound literal expression is not necessarily the same as the type which was syntactically written. Fixes PR 6080. llvm-svn: 93933 --- clang/lib/Frontend/RewriteObjC.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/lib/Frontend') diff --git a/clang/lib/Frontend/RewriteObjC.cpp b/clang/lib/Frontend/RewriteObjC.cpp index 2e101f402b7..c0ad799c5a9 100644 --- a/clang/lib/Frontend/RewriteObjC.cpp +++ b/clang/lib/Frontend/RewriteObjC.cpp @@ -2516,8 +2516,8 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) { SourceLocation()); TypeSourceInfo *superTInfo = Context->getTrivialTypeSourceInfo(superType); - SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), - superTInfo, ILE, false); + SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo, + superType, ILE, false); // struct objc_super * SuperRep = new (Context) UnaryOperator(SuperRep, UnaryOperator::AddrOf, Context->getPointerType(SuperRep->getType()), @@ -2601,8 +2601,8 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) { SourceLocation()); TypeSourceInfo *superTInfo = Context->getTrivialTypeSourceInfo(superType); - SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), - superTInfo, ILE, false); + SuperRep = new (Context) CompoundLiteralExpr(SourceLocation(), superTInfo, + superType, ILE, false); } MsgExprs.push_back(SuperRep); } else { -- cgit v1.2.3