class AdLint::Exam::CBuiltin::W0726

Private Instance Methods

check(ret_stmt) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_check.rb, line 17596
def check(ret_stmt)
  if ret_stmt.expression
    if ret_type = @cur_fun.type.return_type
      if ret_type.void? && (ret_type.const? || ret_type.volatile?)
        W(ret_stmt.location, @cur_fun.identifier.value)
      end
    end
  end
end