From 25f3ba6e96e8164cd71260cc1de28c9a644b125d Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Mon, 20 Feb 2012 22:54:58 +0100 Subject: Simplify external vs bad calls check --- lib/dialyzer/src/dialyzer_analysis_callgraph.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/dialyzer/src/dialyzer_analysis_callgraph.erl') 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, -- cgit v1.2.3