forked from OSchip/llvm-project
Changing std::string to SmallString for r156826.
Based on code review feedback by Jordan Rose. llvm-svn: 156827
This commit is contained in:
parent
7555b6a4e5
commit
9b88cc0a40
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue