class AdLint::Exam::CBuiltin::W1059
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 21277 def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_function_call_expr_evaled += T(:check) end
Private Instance Methods
check(expr, fun, arg_vars, *)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 21284 def check(expr, fun, arg_vars, *) args = arg_vars.zip(fun.type.parameter_types) args.each_with_index do |(arg_var, param_type), idx| if param_type && !param_type.enum? W(expr.argument_expressions[idx].location) if arg_var.type.enum? end end end