forked from OSchip/llvm-project
[analyzer] Look for a StmtPoint node instead of PostStmt in trackNullOrUndefValue.
trackNullOrUndefValue tries to find the first node that matches the statement it is tracking. Since we collect PostStmt nodes (in node reclamation), none of those might be on the current path, so relax the search to look for any StmtPoint. llvm-svn: 178380
This commit is contained in:
parent
1a0ffd523a
commit
8d0dcd8add
|
@ -845,7 +845,7 @@ bool bugreporter::trackNullOrUndefValue(const ExplodedNode *N,
|
|||
// gone too far (though we can likely track the lvalue better anyway).
|
||||
do {
|
||||
const ProgramPoint &pp = N->getLocation();
|
||||
if (Optional<PostStmt> ps = pp.getAs<PostStmt>()) {
|
||||
if (Optional<StmtPoint> ps = pp.getAs<StmtPoint>()) {
|
||||
if (ps->getStmt() == S || ps->getStmt() == Inner)
|
||||
break;
|
||||
} else if (Optional<CallExitEnd> CEE = pp.getAs<CallExitEnd>()) {
|
||||
|
|
Loading…
Reference in New Issue