aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-31 19:51:04 +0000
committerChris Lattner <sabre@nondot.org>2008-01-31 19:51:04 +0000
commitaadaf78d65daef3ac1b45e4ad6136ce859962fe2 (patch)
tree0cb0e0359b64e32b5583be90184008f12d7072cb /include
parentf3dd57e5378bcf5fc9f05832e92479a535d9cd8a (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/clang/Rewrite/Rewriter.h7
1 files changed, 3 insertions, 4 deletions
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