aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-02-20 22:54:58 +0100
committerStavros Aronis <[email protected]>2012-02-22 14:13:20 +0100
commit25f3ba6e96e8164cd71260cc1de28c9a644b125d (patch)
tree089ce9cb3fdc83ef584ddb0663b80e3e327b6c79 /lib/dialyzer/src/dialyzer_analysis_callgraph.erl
parent42e1d866e3929243aa4fd076bd8cfebb66e5be0c (diff)
downloadotp-25f3ba6e96e8164cd71260cc1de28c9a644b125d.tar.gz
otp-25f3ba6e96e8164cd71260cc1de28c9a644b125d.tar.bz2
otp-25f3ba6e96e8164cd71260cc1de28c9a644b125d.zip
Simplify external vs bad calls check
Diffstat (limited to 'lib/dialyzer/src/dialyzer_analysis_callgraph.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index fff8d14630..9b279b012d 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -281,10 +281,10 @@ cleanup_callgraph(#analysis_state{plt = InitPlt, parent = Parent,
if ExtCalls1 =:= [] -> {[], []};
true ->
ModuleSet = sets:from_list(Modules),
- lists:partition(fun({_From, {M, _F, _A}}) ->
- sets:is_element(M, ModuleSet) orelse
- dialyzer_plt:contains_module(InitPlt, M)
- end, ExtCalls1)
+ PltModuleSet = dialyzer_plt:all_modules(InitPlt),
+ AllModules = sets:union(ModuleSet, PltModuleSet),
+ Pred = fun({_From, {M, _F, _A}}) -> sets:is_element(M, AllModules) end,
+ lists:partition(Pred, ExtCalls1)
end,
NonLocalCalls = dialyzer_callgraph:non_local_calls(Callgraph1),
BadCalls2 = [Call || Call = {_From, To} <- NonLocalCalls,