From aadaf78d65daef3ac1b45e4ad6136ce859962fe2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 31 Jan 2008 19:51:04 +0000 Subject: add some helper methods for removing and replacing text, this makes the rewriter more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46622 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Rewrite/Rewriter.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include/clang/Rewrite') diff --git a/include/clang/Rewrite/Rewriter.h b/include/clang/Rewrite/Rewriter.h index 857c77b16e..40886fe8bc 100644 --- a/include/clang/Rewrite/Rewriter.h +++ b/include/clang/Rewrite/Rewriter.h @@ -131,14 +131,13 @@ public: /// location was not rewritable, false otherwise. bool InsertText(SourceLocation Loc, const char *StrData, unsigned StrLen); - /// RemoveText - Remove the specified text region. This method is only valid - /// on a rewritable source location. - void RemoveText(SourceLocation Start, unsigned Length); + /// RemoveText - Remove the specified text region. + bool RemoveText(SourceLocation Start, unsigned Length); /// ReplaceText - This method replaces a range of characters in the input /// buffer with a new string. This is effectively a combined "remove/insert" /// operation. - void ReplaceText(SourceLocation Start, unsigned OrigLength, + bool ReplaceText(SourceLocation Start, unsigned OrigLength, const char *NewStr, unsigned NewLength); /// ReplaceStmt - This replaces a Stmt/Expr with another, using the pretty -- cgit v1.2.3-70-g09d2