class AdLint::Exam::CBuiltin::W0641
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 15116 def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check) end
Private Instance Methods
check(expr, orig_var, rslt_var)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 15123 def check(expr, orig_var, rslt_var) lhs_type = orig_var.type.unqualify rhs_type = rslt_var.type.unqualify case when lhs_type.floating? && rhs_type.pointer? && !rhs_type.base_type.function? W(expr.location) when rhs_type.floating? && lhs_type.pointer? && !lhs_type.base_type.function? W(expr.location) end end