aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteTest.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-01-14 18:19:28 +0000
committerSteve Naroff <snaroff@apple.com>2008-01-14 18:19:28 +0000
commite9b12198c4cc7f5687960100351b4af006c14469 (patch)
tree8578adc0a00f1f91b7430f669a6fc792f686ef89 /Driver/RewriteTest.cpp
parent5d5480380d7b7c3590a0283ddf239220e514e576 (diff)
Record if a compound literal expression is @ file scope. This allows us to implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.
Bug/patch by Eli Friedman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r--Driver/RewriteTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp
index 6f6bfc2354..120ffce685 100644
--- a/Driver/RewriteTest.cpp
+++ b/Driver/RewriteTest.cpp
@@ -1510,7 +1510,7 @@ Stmt *RewriteTest::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) {
InitListExpr *ILE = new InitListExpr(SourceLocation(),
&InitExprs[0], InitExprs.size(),
SourceLocation());
- CompoundLiteralExpr *StrRep = new CompoundLiteralExpr(CFConstantStrType, ILE);
+ CompoundLiteralExpr *StrRep = new CompoundLiteralExpr(CFConstantStrType, ILE, false);
// struct NSConstantString *
expType = Context->getPointerType(StrRep->getType());
Unop = new UnaryOperator(StrRep, UnaryOperator::AddrOf, expType,
@@ -1643,7 +1643,7 @@ Stmt *RewriteTest::SynthMessageExpr(ObjCMessageExpr *Exp) {
&InitExprs[0], InitExprs.size(),
SourceLocation());
CompoundLiteralExpr *SuperRep = new CompoundLiteralExpr(SourceLocation(),
- superType, ILE);
+ superType, ILE, false);
// struct objc_super *
Expr *Unop = new UnaryOperator(SuperRep, UnaryOperator::AddrOf,
Context->getPointerType(SuperRep->getType()),
@@ -1696,7 +1696,7 @@ Stmt *RewriteTest::SynthMessageExpr(ObjCMessageExpr *Exp) {
&InitExprs[0], InitExprs.size(),
SourceLocation());
CompoundLiteralExpr *SuperRep = new CompoundLiteralExpr(SourceLocation(),
- superType, ILE);
+ superType, ILE, false);
// struct objc_super *
Expr *Unop = new UnaryOperator(SuperRep, UnaryOperator::AddrOf,
Context->getPointerType(SuperRep->getType()),