simplify a bit.

llvm-svn: 125724
This commit is contained in:
Chris Lattner 2011-02-17 05:38:27 +00:00
parent e281e99f76
commit 5a9b1ec94c
2 changed files with 2 additions and 4 deletions

View File

@ -496,7 +496,7 @@ SVal CStringChecker::getCStringLength(CheckerContext &C, const GRState *&state,
llvm::SmallString<120> buf; llvm::SmallString<120> buf;
llvm::raw_svector_ostream os(buf); llvm::raw_svector_ostream os(buf);
os << "Argument to byte string function is the address of the label '" os << "Argument to byte string function is the address of the label '"
<< Label->getLabel()->getID()->getName() << Label->getLabel()->getName()
<< "', which is not a null-terminated string"; << "', which is not a null-terminated string";
// Generate a report for this bug. // Generate a report for this bug.

View File

@ -380,9 +380,7 @@ bool MallocChecker::SummarizeValue(llvm::raw_ostream& os, SVal V) {
else if (loc::ConcreteInt *ConstAddr = dyn_cast<loc::ConcreteInt>(&V)) else if (loc::ConcreteInt *ConstAddr = dyn_cast<loc::ConcreteInt>(&V))
os << "a constant address (" << ConstAddr->getValue() << ")"; os << "a constant address (" << ConstAddr->getValue() << ")";
else if (loc::GotoLabel *Label = dyn_cast<loc::GotoLabel>(&V)) else if (loc::GotoLabel *Label = dyn_cast<loc::GotoLabel>(&V))
os << "the address of the label '" os << "the address of the label '" << Label->getLabel()->getName() << "'";
<< Label->getLabel()->getID()->getName()
<< "'";
else else
return false; return false;