class AdLint::Exam::CBuiltin::W0655

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 15359
def initialize(phase_ctxt)
  super
  interp = phase_ctxt[:cc1_interpreter]
  interp.on_sizeof_expr_evaled += T(:check)
end

Private Instance Methods

check(expr, ope_var, *) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 15366
def check(expr, ope_var, *)
  type = ope_var.type
  if type.scalar? && type.integer? && type.bitfield?
    W(expr.location)
  end
end