class AdLint::Exam::CBuiltin::W0019
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 379 def initialize(phase_ctxt) super interp = phase_ctxt[:cc1_interpreter] interp.on_explicit_conv_performed += T(:check_explicit_conversion) end
Private Instance Methods
check_explicit_conversion(expr, orig_var, rslt_var)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 386 def check_explicit_conversion(expr, orig_var, rslt_var) orig_type = orig_var.type rslt_type = rslt_var.type if orig_type.pointer? && orig_type.unqualify.base_type.const? && rslt_type.pointer? && !rslt_type.unqualify.base_type.const? W(expr.location) end end