diff options
author | John McCall <rjmccall@apple.com> | 2010-01-19 22:33:45 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-01-19 22:33:45 +0000 |
commit | 5d7aa7fa0ae5154c8ca7fe8851b0cafcf8d61700 (patch) | |
tree | 38f87da151f3ebb955b1ae4bf818aa60ef74f66f /clang/lib/Frontend | |
parent | 8d67d2f5f8fcf8eeb269ab33315a848f4acfba06 (diff) | |
download | bcm5719-llvm-5d7aa7fa0ae5154c8ca7fe8851b0cafcf8d61700.tar.gz bcm5719-llvm-5d7aa7fa0ae5154c8ca7fe8851b0cafcf8d61700.zip |
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
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/RewriteObjC.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 { |