class AdLint::Exam::CBuiltin::W0077

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

Private Instance Methods

check(const_spec, *) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 1714
def check(const_spec, *)
  case const_spec.constant.value
  when /\A(?:[0-9]*\.[0-9]*[Ee][+-]?[0-9]+|[0-9]+\.?[Ee][+-]?[0-9]+).*l\z/,
       /\A(?:[0-9]*\.[0-9]+|[0-9]+\.).*l\z/,
       /\A(?:0x[0-9A-Fa-f]+|0b[01]+|[0-9]+)l\z/
    W(const_spec.location)
  end
end