class AdLint::Exam::CBuiltin::FunDefExtraction
Public Class Methods
new(phase_ctxt)
click to toggle source
Calls superclass method
AdLint::Examination::new
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 223 def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_function_defined += T(:extract_function) end
Private Instance Methods
do_execute(*)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 231 def do_execute(*) end
do_prepare(*)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 230 def do_prepare(*) end
extract_function(fun_def, fun)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 233 def extract_function(fun_def, fun) fun_id = FunctionId.new(fun_def.identifier.value, fun_def.signature.to_s) case when fun.declared_as_extern? FUNDEF(fun_def.identifier.location, "X", "F", fun_id, fun_def.lines) when fun.declared_as_static? FUNDEF(fun_def.identifier.location, "I", "F", fun_id, fun_def.lines) end end