On May 23, 2012, at 5:45 PM, Jordy Rose wrote:
>
> On May 23, 2012, at 19:47, Fariborz Jahanian wrote:
>
>> +Stmt
>> *RewriteModernObjC::RewriteObjCAutoreleasePoolStmt(ObjCAutoreleasePoolStmt
>> *S) {
>> + SourceLocation startLoc = S->getAtLoc();
>> + ReplaceText(startLoc, strlen("@autoreleasepool"), "/* @autoreleasepool
>> */");
>> + std::string buf;
>> + buf = "{ __AtAutoreleasePool __autoreleasepool; ";
>> + ReplaceText(S->getSubStmt()->getLocStart(), 1, buf);
>
> You have a literal string copied into a std::string and then passed to
> ReplaceText. Why not pass it directly, as with the first replacement? Or if
> this is about line length, maybe use a StringRef variable instead of a
> std::string?
No particular reason for this. Fixed in r157436.
- Thanks, Fariborz
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits