class AdLint::Exam::CBuiltin::W0541

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 867
def initialize(phase_ctxt)
  super
  phase_ctxt[:cc1_source].on_inline_assembly += M(:check)
end

Private Instance Methods

check(asm_toks) click to toggle source
# File lib/adlint/exam/c_builtin/cpp_check.rb, line 873
def check(asm_toks)
  head_loc = asm_toks.first.location
  if head_loc.in_analysis_target?(traits)
    W(head_loc) unless asm_toks.any? { |tok| tok.replaced? }
  end
end