class AdLint::Exam::CBuiltin::W0555
Public Class Methods
new(phase_ctxt)
click to toggle source
Calls superclass method
AdLint::Examination::new
# File lib/adlint/exam/c_builtin/ld_check.rb, line 42 def initialize(phase_ctxt) super phase_ctxt[:ld_function_traversal].on_definition += T(:check) @call_graph = phase_ctxt[:ld_call_graph] end
Private Instance Methods
check(fun)
click to toggle source
# File lib/adlint/exam/c_builtin/ld_check.rb, line 49 def check(fun) refs = @call_graph.indirect_callers_of(fun) if refs.any? { |ref| caller_fun = ref.function and caller_fun == fun } W(fun.location) end end