From 8607d4e4b2c8223f4e3a01f649d1b8c5cfdcceaa Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 29 Mar 2014 16:54:24 +0000 Subject: [PATCH] Avoid a local Twine variable. Harmless in this case but potentially dangerous if it gets extended some day. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205107 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Edit/EditedSource.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Edit/EditedSource.cpp b/lib/Edit/EditedSource.cpp index 34b5e62333..8fa2ee57d2 100644 --- a/lib/Edit/EditedSource.cpp +++ b/lib/Edit/EditedSource.cpp @@ -72,13 +72,11 @@ bool EditedSource::commitInsert(SourceLocation OrigLoc, return true; } - Twine concat; if (beforePreviousInsertions) - concat = Twine(text) + FA.Text; + FA.Text = copyString(Twine(text) + FA.Text); else - concat = Twine(FA.Text) + text; + FA.Text = copyString(Twine(FA.Text) + text); - FA.Text = copyString(concat); return true; } -- 2.40.0