class AdLint::Exam::CBuiltin::W1028
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 20513 def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_variable_defined += T(:check) interp.on_variable_declared += T(:check) end
Private Instance Methods
check(dcl_or_def, var)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 20521 def check(dcl_or_def, var) if var.type.array? type = var.type.base_type while type.array? if type.length type = type.base_type else W(dcl_or_def.location) break end end end end