aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Rewrite
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-03 23:31:16 +0000
committerChris Lattner <sabre@nondot.org>2008-10-03 23:31:16 +0000
commitb5cd09a2bf1509167a2e7a46bdd0316812a93335 (patch)
tree8a0e2b81d76090e2aebc744600ef645a4bfaf4e1 /include/clang/Rewrite
parent94ede6e443726affff31c1666a8ed57e6bd4d674 (diff)
add a new Rewriter::getRewritenText method that returns the text for a range
that includes any edits in the range. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Rewrite')
-rw-r--r--include/clang/Rewrite/Rewriter.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Rewrite/Rewriter.h b/include/clang/Rewrite/Rewriter.h
index 6176cfb2dd..9a579f1263 100644
--- a/include/clang/Rewrite/Rewriter.h
+++ b/include/clang/Rewrite/Rewriter.h
@@ -136,6 +136,11 @@ public:
/// are in the same file. If not, this returns -1.
int getRangeSize(SourceRange Range) const;
+ /// getRewritenText - Return the rewritten form of the text in the specified
+ /// range. If the start or end of the range was unrewritable or if they are
+ /// in different buffers, this returns an empty string.
+ std::string getRewritenText(SourceRange Range) const;
+
/// 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.