Changing std::string to SmallString for r156826.
Based on code review feedback by Jordan Rose.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156827 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 9c637b8..1fc3c1a 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -4084,11 +4084,11 @@
SmallString<16> PrettySourceValue;
Value.toString(PrettySourceValue);
- std::string PrettyTargetValue;
+ SmallString<16> PrettyTargetValue;
if (T->isSpecificBuiltinType(BuiltinType::Bool))
PrettyTargetValue = IntegerValue == 0 ? "false" : "true";
else
- PrettyTargetValue = IntegerValue.toString(10);
+ IntegerValue.toString(PrettyTargetValue);
S.Diag(FL->getExprLoc(), diag::warn_impcast_literal_float_to_integer)
<< FL->getType() << T.getUnqualifiedType() << PrettySourceValue