From: David Blaikie Date: Tue, 15 May 2012 17:18:27 +0000 (+0000) Subject: Changing std::string to SmallString for r156826. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de7e7b857c8c6f9dc7fecb18fcb947b003748d16;p=clang 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 9c637b89dd..1fc3c1aeff 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -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