forked from OSchip/llvm-project
[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:
parent
847075607f
commit
1b37ea0a5f
|
@ -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(),
|
||||
|
|
|
@ -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}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue