class AdLint::Exam::CBuiltin::W0525

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 12138
def initialize(phase_ctxt)
  super
  trav = phase_ctxt[:cc1_ast_traversal]
  trav.enter_member_declaration += T(:check)
end

Private Instance Methods

check(node) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 12145
def check(node)
  return unless node.type.scalar? && node.type.integer?

  if node.identifier
    if node.type.bitfield? && node.type.signed? && node.type.bit_size == 1
      W(node.location)
    end
  end
end