[analyzer] Fix lack of coverage after empty inlined function.

We should not stop exploring the path after we return from an empty
function.

llvm-svn: 157859
This commit is contained in:
Anna Zaks 2012-06-01 23:48:40 +00:00
parent 847075607f
commit 1b37ea0a5f
2 changed files with 10 additions and 0 deletions

View File

@ -159,6 +159,8 @@ void ExprEngine::processCallExit(ExplodedNode *CEBNode) {
removeDead(BindedRetNode, CleanedNodes, 0, callerCtx, LastSt,
ProgramPoint::PostStmtPurgeDeadSymbolsKind);
currentBuilderContext = 0;
} else {
CleanedNodes.Add(CEBNode);
}
for (ExplodedNodeSet::iterator I = CleanedNodes.begin(),

View File

@ -92,3 +92,11 @@ void coverage9(int *x) {
function_which_gives_up_settonull(&x);
y = (*x); // no warning
}
static void empty_function(){
}
int use_empty_function(int x) {
x = 0;
empty_function();
return 5/x; //expected-warning {{Division by zero}}
}