class AdLint::Exam::CBuiltin::W0535
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 12338 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 12350 def check(node) W(node.location) if @in_for_stmt end
enter_for_statement(node)
click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 12354 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 12358 def leave_for_statement(node) @in_for_stmt = false end