]> granicus.if.org Git - clang/commitdiff
various updates to match r54873 on mainline.
authorChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 07:19:51 +0000 (07:19 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 07:19:51 +0000 (07:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54874 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp
lib/Analysis/GRState.cpp
lib/Analysis/RValues.cpp
lib/Lex/PPExpressions.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaStmt.cpp

index 5002ed6f743ddef8f8c5eaa395a74c3d9d4fedc6..a51f9fb335c0470e02844736d74ae01941e766ee 100644 (file)
@@ -537,7 +537,7 @@ void GRBugReporter::GeneratePathDiagnostic(PathDiagnostic& PD,
                   continue;
                 }
                 
-                os << V.toString();
+                os << V;
               }              
               
               os << ":'  at line " 
index f8725470c00335f3ac161f00c5362157b5630df6..cd81c57f90b931fa553a2aff1921fe15aa6b18f3 100644 (file)
@@ -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;
       }
     }
   }
index a3966221232793d3ce646d10bbac03cf9fc2fec2..b372ab3831bd3a7fc106871bbecf34936aa2b70e 100644 (file)
@@ -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:
index c0499fac141b35d839c82a320df9ffacd10b9cba..4042604391c21f129ffeff164a9119d9ea75bd31 100644 (file)
@@ -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());
index a0694609190b6f92cf477ad9af94ca54f5d429b5..906255e87ffc5be57f97377d18201ee37f313923 100644 (file)
@@ -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.
index abc7f8865aaf12da9214ca161bc7450996d8e8c6..6bc6f3fb0ce321d06e79b85ac382a4df928cde78 100644 (file)
@@ -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,