class AdLint::Exam::CBuiltin::W1075
Public Class Methods
new(phase_ctxt)
click to toggle source
Calls superclass method
AdLint::Examination::new
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 21778 def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_declared += T(:declare_variable) interp.on_variable_defined += T(:define_variable) interp.on_explicit_function_declared += T(:declare_function) interp.on_explicit_function_defined += T(:define_function) end
Private Instance Methods
declare_function(fun_dcl, fun)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 21810 def declare_function(fun_dcl, fun) if fun.named? if fun.declared_as_static? sc_spec = fun_dcl.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(fun_dcl.location, fun.name) end end end end
declare_variable(var_dcl, var)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 21788 def declare_variable(var_dcl, var) if var.named? if var.declared_as_static? sc_spec = var_dcl.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(var_dcl.location, var.name) end end end end
define_function(fun_def, fun)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 21821 def define_function(fun_def, fun) if fun.named? if fun.declared_as_static? sc_spec = fun_def.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(fun_def.location, fun.name) end end end end
define_variable(var_def, var)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 21799 def define_variable(var_def, var) if var.named? if var.declared_as_static? sc_spec = var_def.storage_class_specifier unless sc_spec && sc_spec.type == :STATIC W(var_def.location, var.name) end end end end