diff options
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index db2c1ee70b..0c303daddf 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -329,7 +329,10 @@ Stmt *RewriteTest::RewriteFunctionBody(Stmt *S) { Stmt *RewriteTest::RewriteAtEncode(ObjCEncodeExpr *Exp) { // Create a new string expression. QualType StrType = Context->getPointerType(Context->CharTy); - Expr *Replacement = new StringLiteral("foo", 3, false, StrType, + std::string StrEncoding; + Context->getObjcEncodingForType(Exp->getEncodedType(), StrEncoding); + Expr *Replacement = new StringLiteral(StrEncoding.c_str(), + StrEncoding.length(), false, StrType, SourceLocation(), SourceLocation()); Rewrite.ReplaceStmt(Exp, Replacement); delete Exp; |