Changing std::string to SmallString for r156826.

Based on code review feedback by Jordan Rose.

llvm-svn: 156827
This commit is contained in:
David Blaikie 2012-05-15 17:18:27 +00:00
parent 7555b6a4e5
commit 9b88cc0a40
1 changed files with 2 additions and 2 deletions

View File

@ -4084,11 +4084,11 @@ void DiagnoseFloatingLiteralImpCast(Sema &S, FloatingLiteral *FL, QualType T,
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