aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_callgraph.erl
diff options
context:
space:
mode:
authorZandra <[email protected]>2015-12-28 11:56:18 +0100
committerZandra <[email protected]>2015-12-28 11:56:18 +0100
commit7dc1b19582a61281742fd1dcc880899b72e6becb (patch)
tree0099939558229b5fbbaed9ac55d212d5767d4ff5 /lib/dialyzer/src/dialyzer_callgraph.erl
parent5daa0591e671d3a08988d80e295df3b0c7b002e5 (diff)
parent60d310117c005d6a05dcfc729b79a174b44e5370 (diff)
downloadotp-7dc1b19582a61281742fd1dcc880899b72e6becb.tar.gz
otp-7dc1b19582a61281742fd1dcc880899b72e6becb.tar.bz2
otp-7dc1b19582a61281742fd1dcc880899b72e6becb.zip
Merge branch 'maint'
Diffstat (limited to 'lib/dialyzer/src/dialyzer_callgraph.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_callgraph.erl27
1 files changed, 25 insertions, 2 deletions
diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl
index 069c02fa65..ede29b42bc 100644
--- a/lib/dialyzer/src/dialyzer_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_callgraph.erl
@@ -485,14 +485,37 @@ scan_one_core_fun(TopTree, FunName) ->
call ->
CalleeM = cerl:call_module(Tree),
CalleeF = cerl:call_name(Tree),
- A = length(cerl:call_args(Tree)),
+ CalleeArgs = cerl:call_args(Tree),
+ A = length(CalleeArgs),
case (cerl:is_c_atom(CalleeM) andalso
cerl:is_c_atom(CalleeF)) of
true ->
M = cerl:atom_val(CalleeM),
F = cerl:atom_val(CalleeF),
case erl_bif_types:is_known(M, F, A) of
- true -> Acc;
+ true ->
+ case {M, F, A} of
+ {erlang, make_fun, 3} ->
+ [CA1, CA2, CA3] = CalleeArgs,
+ case
+ cerl:is_c_atom(CA1) andalso
+ cerl:is_c_atom(CA2) andalso
+ cerl:is_c_int(CA3)
+ of
+ true ->
+ MM = cerl:atom_val(CA1),
+ FF = cerl:atom_val(CA2),
+ AA = cerl:int_val(CA3),
+ case erl_bif_types:is_known(MM, FF, AA) of
+ true -> Acc;
+ false -> [{FunName, {MM, FF, AA}}|Acc]
+ end;
+ false ->
+ Acc
+ end;
+ _ ->
+ Acc
+ end;
false -> [{FunName, {M, F, A}}|Acc]
end;
false ->