[cfe-commits] r79448 - in /cfe/trunk: include/clang/Rewrite/Rewriter.h lib/Frontend/FixItRewriter.cpp lib/Frontend/RewriteBlocks.cpp lib/Frontend/RewriteMacros.cpp lib/Frontend/RewriteObjC.cpp lib/Rewrite/HTMLRewrite.cpp lib/Rewrite/Rewriter.cpp
Daniel Dunbar
daniel at zuster.org
Fri Aug 21 01:25:04 PDT 2009
On Thu, Aug 20, 2009 at 1:43 AM, Sebastian
Redl<sebastian.redl at getdesigned.at> wrote:
> This comment is wrong, both in function name and description (it's
> insertAfter==true). Not part of your patch, actually, but since you're
> in the area ...
Fixed, thanks.
>> @@ -159,7 +158,7 @@
>> /// InsertText - Insert the specified string at the specified location in the
>> /// original buffer. This method returns true (and does nothing) if the input
>> /// location was not rewritable, false otherwise.
>> - bool InsertText(SourceLocation Loc, const char *StrData, unsigned StrLen,
>> + bool InsertText(SourceLocation Loc, const llvm::StringRef &Str,
>> bool InsertAfter = true);
>>
>> /// InsertTextAfter - Insert the specified string at the specified location in
>> @@ -167,9 +166,8 @@
>> /// the input location was not rewritable, false otherwise. Text is
>> /// inserted after any other text that has been previously inserted
>> /// at the some point (the default behavior for InsertText).
>> - bool InsertTextAfter(SourceLocation Loc, const char *StrData,
>> - unsigned StrLen) {
>> - return InsertText(Loc, StrData, StrLen);
>> + bool InsertTextAfter(SourceLocation Loc, const llvm::StringRef &Str) {
>> + return InsertText(Loc, Str, false);
>> }
>>
> This one looks actually wrong in the implementation.
Oops! Nice catch, fixed...
- Daniel
More information about the cfe-commits
mailing list