class AdLint::Exam::CBuiltin::W0811

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 1409
def initialize(phase_ctxt)
  super
  macro_table = phase_ctxt[:cpp_macro_table]
  macro_table.on_object_like_macro_replacement   += T(:check)
  macro_table.on_function_like_macro_replacement += T(:check)
end

Private Instance Methods

check(*, rslt_toks) click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 1417
def check(*, rslt_toks)
  if defined_tok = rslt_toks.find { |tok| tok.value == "defined" }
    W(defined_tok.location)
  end
end