forked from OSchip/llvm-project
Remove a recursive visitiation in ExprEngine that is no longer needed
because the CFG is fully linearized. llvm-svn: 151711
This commit is contained in:
parent
efe5e2ea9f
commit
64aea6524d
|
@ -335,15 +335,9 @@ void ExprEngine::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred,
|
|||
|
||||
void ExprEngine::VisitCXXDeleteExpr(const CXXDeleteExpr *CDE,
|
||||
ExplodedNode *Pred, ExplodedNodeSet &Dst) {
|
||||
// Should do more checking.
|
||||
ExplodedNodeSet Argevaluated;
|
||||
Visit(CDE->getArgument(), Pred, Argevaluated);
|
||||
StmtNodeBuilder Bldr(Argevaluated, Dst, *currentBuilderContext);
|
||||
for (ExplodedNodeSet::iterator I = Argevaluated.begin(),
|
||||
E = Argevaluated.end(); I != E; ++I) {
|
||||
ProgramStateRef state = (*I)->getState();
|
||||
Bldr.generateNode(CDE, *I, state);
|
||||
}
|
||||
StmtNodeBuilder Bldr(Pred, Dst, *currentBuilderContext);
|
||||
ProgramStateRef state = Pred->getState();
|
||||
Bldr.generateNode(CDE, Pred, state);
|
||||
}
|
||||
|
||||
void ExprEngine::VisitCXXThisExpr(const CXXThisExpr *TE, ExplodedNode *Pred,
|
||||
|
|
|
@ -39,7 +39,6 @@ void foo4(void) {
|
|||
*np = 0; // no-warning
|
||||
}
|
||||
|
||||
|
||||
int pr10372(void *& x) {
|
||||
// GNU null is a pointer-sized integer, not a pointer.
|
||||
x = __null;
|
||||
|
@ -47,3 +46,7 @@ int pr10372(void *& x) {
|
|||
return __null;
|
||||
}
|
||||
|
||||
void zoo1() {
|
||||
char **p = 0;
|
||||
delete *(p + 0); // expected-warning{{Dereference of null pointer}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue