various updates to match r54873 on mainline.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54874 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index 5002ed6..a51f9fb 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -537,7 +537,7 @@
continue;
}
- os << V.toString();
+ os << V;
}
os << ":' at line "
diff --git a/lib/Analysis/GRState.cpp b/lib/Analysis/GRState.cpp
index f872547..cd81c57 100644
--- a/lib/Analysis/GRState.cpp
+++ b/lib/Analysis/GRState.cpp
@@ -299,7 +299,7 @@
for (ConstEqTy::iterator I = CE.begin(), E = CE.end(); I!=E; ++I)
Out << nl << " $" << I.getKey()
- << " : " << I.getData()->toString();
+ << " : " << *I.getData();
}
// Print != constraints.
@@ -320,7 +320,7 @@
if (isFirst) isFirst = false;
else Out << ", ";
- Out << (*J)->toString();
+ Out << *J;
}
}
}
diff --git a/lib/Analysis/RValues.cpp b/lib/Analysis/RValues.cpp
index a396622..b372ab3 100644
--- a/lib/Analysis/RValues.cpp
+++ b/lib/Analysis/RValues.cpp
@@ -352,7 +352,7 @@
switch (getSubKind()) {
case nonlval::ConcreteIntKind:
- Out << cast<nonlval::ConcreteInt>(this)->getValue().toString();
+ Out << cast<nonlval::ConcreteInt>(this)->getValue();
if (cast<nonlval::ConcreteInt>(this)->getValue().isUnsigned())
Out << 'U';
@@ -369,7 +369,7 @@
Out << '$' << C.getConstraint().getSymbol() << ' ';
printOpcode(Out, C.getConstraint().getOpcode());
- Out << ' ' << C.getConstraint().getInt().toString();
+ Out << ' ' << C.getConstraint().getInt();
if (C.getConstraint().getInt().isUnsigned())
Out << 'U';
@@ -395,8 +395,7 @@
switch (getSubKind()) {
case lval::ConcreteIntKind:
- Out << cast<lval::ConcreteInt>(this)->getValue().toString()
- << " (LVal)";
+ Out << cast<lval::ConcreteInt>(this)->getValue() << " (LVal)";
break;
case lval::SymbolValKind:
diff --git a/lib/Lex/PPExpressions.cpp b/lib/Lex/PPExpressions.cpp
index c0499fa..4042604 100644
--- a/lib/Lex/PPExpressions.cpp
+++ b/lib/Lex/PPExpressions.cpp
@@ -470,11 +470,13 @@
if (ValueLive && Res.isUnsigned()) {
if (!LHS.isUnsigned() && LHS.Val.isNegative())
PP.Diag(OpLoc, diag::warn_pp_convert_lhs_to_positive,
- LHS.Val.toStringSigned() + " to "+LHS.Val.toStringUnsigned(),
+ LHS.Val.toString(10, true) + " to " +
+ LHS.Val.toString(10, false),
LHS.getRange(), RHS.getRange());
if (!RHS.isUnsigned() && RHS.Val.isNegative())
PP.Diag(OpLoc, diag::warn_pp_convert_rhs_to_positive,
- RHS.Val.toStringSigned() + " to "+RHS.Val.toStringUnsigned(),
+ RHS.Val.toString(10, true) + " to " +
+ RHS.Val.toString(10, false),
LHS.getRange(), RHS.getRange());
}
LHS.Val.setIsUnsigned(Res.isUnsigned());
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index a069460..906255e 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2252,7 +2252,7 @@
V.extend(InitVal.getBitWidth());
if (V != InitVal)
Diag(ECD->getLocation(), diag::ext_enum_value_not_int,
- InitVal.toString());
+ InitVal.toString(10));
}
// Keep track of the size of positive and negative values.
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index abc7f88..6bc6f3f 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -229,7 +229,7 @@
// If the input was signed and negative and the output is unsigned,
// warn.
if (!NewSign && OldVal.isSigned() && OldVal.isNegative())
- Diag(Loc, DiagID, OldVal.toString(), Val.toString());
+ Diag(Loc, DiagID, OldVal.toString(10), Val.toString(10));
Val.setIsSigned(NewSign);
} else if (NewWidth < Val.getBitWidth()) {
@@ -240,7 +240,7 @@
ConvVal.extend(Val.getBitWidth());
ConvVal.setIsSigned(Val.isSigned());
if (ConvVal != Val)
- Diag(Loc, DiagID, Val.toString(), ConvVal.toString());
+ Diag(Loc, DiagID, Val.toString(10), ConvVal.toString(10));
// Regardless of whether a diagnostic was emitted, really do the
// truncation.
@@ -253,7 +253,7 @@
Val.setIsSigned(NewSign);
if (Val.isNegative()) // Sign bit changes meaning.
- Diag(Loc, DiagID, OldVal.toString(), Val.toString());
+ Diag(Loc, DiagID, OldVal.toString(10), Val.toString(10));
}
}
@@ -376,7 +376,7 @@
if (CaseVals[i].first == CaseVals[i+1].first) {
// If we have a duplicate, report it.
Diag(CaseVals[i+1].second->getLHS()->getLocStart(),
- diag::err_duplicate_case, CaseVals[i].first.toString());
+ diag::err_duplicate_case, CaseVals[i].first.toString(10));
Diag(CaseVals[i].second->getLHS()->getLocStart(),
diag::err_duplicate_case_prev);
// FIXME: We really want to remove the bogus case stmt from the substmt,
@@ -460,7 +460,7 @@
if (OverlapStmt) {
// If we have a duplicate, report it.
Diag(CR->getLHS()->getLocStart(),
- diag::err_duplicate_case, OverlapVal.toString());
+ diag::err_duplicate_case, OverlapVal.toString(10));
Diag(OverlapStmt->getLHS()->getLocStart(),
diag::err_duplicate_case_prev);
// FIXME: We really want to remove the bogus case stmt from the substmt,