class AdLint::Exam::CBuiltin::W0480

Public Class Methods

new(phase_ctxt) click to toggle source
Calls superclass method AdLint::Examination::new
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 717
def initialize(phase_ctxt)
  super
  trav = phase_ctxt[:cpp_ast_traversal]
  trav.enter_object_like_define_line      += T(:check)
  trav.enter_function_like_define_line    += T(:check)
  trav.enter_va_function_like_define_line += T(:check)
end

Private Instance Methods

check(node) click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 726
def check(node)
  if repl_list = node.replacement_list and
      repl_list.may_represent_punctuator? ||
      repl_list.may_represent_controlling_keyword?
    W(node.location)
  end
end