r205107 - Avoid a local Twine variable.
Benjamin Kramer
benny.kra at googlemail.com
Sat Mar 29 09:54:24 PDT 2014
Author: d0k
Date: Sat Mar 29 11:54:24 2014
New Revision: 205107
URL: http://llvm.org/viewvc/llvm-project?rev=205107&view=rev
Log:
Avoid a local Twine variable.
Harmless in this case but potentially dangerous if it gets extended some day.
Modified:
cfe/trunk/lib/Edit/EditedSource.cpp
Modified: cfe/trunk/lib/Edit/EditedSource.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Edit/EditedSource.cpp?rev=205107&r1=205106&r2=205107&view=diff
==============================================================================
--- cfe/trunk/lib/Edit/EditedSource.cpp (original)
+++ cfe/trunk/lib/Edit/EditedSource.cpp Sat Mar 29 11:54:24 2014
@@ -72,13 +72,11 @@ bool EditedSource::commitInsert(SourceLo
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;
}
More information about the cfe-commits
mailing list