aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/FixItRewriter.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-19 19:10:30 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-19 19:10:30 +0000
commitd7407dc92c7d19cafce429e7e1cf9819d3fc0b92 (patch)
treeb1682301e20128532bd5143096f2eee9f99794f1 /lib/Frontend/FixItRewriter.cpp
parent7e37c818f9f77608c602ffb32c1135e3cd0132a8 (diff)
Convert parts of Rewriter to StringRef based API.
- Please accept my sincere apologies for the gratuitous elimination of code duplication, manual string length counting, unnecessary strlen calls, etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/FixItRewriter.cpp')
-rw-r--r--lib/Frontend/FixItRewriter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Frontend/FixItRewriter.cpp b/lib/Frontend/FixItRewriter.cpp
index cd7cee0f68..5fdc2305cf 100644
--- a/lib/Frontend/FixItRewriter.cpp
+++ b/lib/Frontend/FixItRewriter.cpp
@@ -175,8 +175,7 @@ void FixItRewriter::HandleDiagnostic(Diagnostic::Level DiagLevel,
// We're replacing code.
if (Rewrite.ReplaceText(Hint.RemoveRange.getBegin(),
Rewrite.getRangeSize(Hint.RemoveRange),
- Hint.CodeToInsert.c_str(),
- Hint.CodeToInsert.size()))
+ Hint.CodeToInsert))
Failed = true;
}