class AdLint::Exam::CBuiltin::W0447
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 9458 def initialize(phase_ctxt) super trav = phase_ctxt[:cc1_ast_traversal] trav.enter_comma_separated_expression += T(:check) trav.enter_for_statement += T(:enter_for_statement) trav.leave_for_statement += T(:leave_for_statement) trav.enter_c99_for_statement += T(:enter_for_statement) trav.leave_c99_for_statement += T(:leave_for_statement) @in_for_stmt = false end
Private Instance Methods
check(node)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 9470 def check(node) W(node.location) unless @in_for_stmt end
enter_for_statement(node)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 9474 def enter_for_statement(node) @in_for_stmt = true end
leave_for_statement(node)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 9478 def leave_for_statement(node) @in_for_stmt = false end