Fix diagnostics bugs when computing ranges for the retain/release checker.

llvm-svn: 64962
This commit is contained in:
Ted Kremenek 2009-02-18 22:17:20 +00:00
parent d7cfc246f6
commit a790c8dcac
1 changed files with 4 additions and 1 deletions

View File

@ -2462,7 +2462,10 @@ PathDiagnosticPiece* CFRefReport::VisitNode(const ExplodedNode<GRState>* N,
if (Expr* Exp = dyn_cast_or_null<Expr>(*I)) {
SVal X = CurrSt.GetSVal(Exp);
if (loc::SymbolVal* SV = dyn_cast<loc::SymbolVal>(&X))
if (SV->getSymbol() == Sym) P->addRange(Exp->getSourceRange()); break;
if (SV->getSymbol() == Sym) {
P->addRange(Exp->getSourceRange());
break;
}
}
return P;