mirror of
https://github.com/intel/llvm.git
synced 2026-02-06 15:18:53 +08:00
various updates to match r54873 on mainline.
llvm-svn: 54874
This commit is contained in:
@@ -537,7 +537,7 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
|
||||
continue;
|
||||
}
|
||||
|
||||
os << V.toString();
|
||||
os << V;
|
||||
}
|
||||
|
||||
os << ":' at line "
|
||||
|
||||
@@ -299,7 +299,7 @@ void GRState::print(std::ostream& Out, Printer** Beg, Printer** End,
|
||||
|
||||
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 @@ void GRState::print(std::ostream& Out, Printer** Beg, Printer** End,
|
||||
if (isFirst) isFirst = false;
|
||||
else Out << ", ";
|
||||
|
||||
Out << (*J)->toString();
|
||||
Out << *J;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ void NonLVal::print(std::ostream& Out) const {
|
||||
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 @@ void NonLVal::print(std::ostream& Out) const {
|
||||
|
||||
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 @@ void LVal::print(std::ostream& Out) const {
|
||||
switch (getSubKind()) {
|
||||
|
||||
case lval::ConcreteIntKind:
|
||||
Out << cast<lval::ConcreteInt>(this)->getValue().toString()
|
||||
<< " (LVal)";
|
||||
Out << cast<lval::ConcreteInt>(this)->getValue() << " (LVal)";
|
||||
break;
|
||||
|
||||
case lval::SymbolValKind:
|
||||
|
||||
@@ -470,11 +470,13 @@ static bool EvaluateDirectiveSubExpr(PPValue &LHS, unsigned MinPrec,
|
||||
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());
|
||||
|
||||
@@ -2252,7 +2252,7 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX,
|
||||
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.
|
||||
|
||||
@@ -229,7 +229,7 @@ void Sema::ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &Val,
|
||||
// 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 @@ void Sema::ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &Val,
|
||||
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 @@ void Sema::ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &Val,
|
||||
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 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
|
||||
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 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user