Class: AdLint::Exam::CBuiltin::W0705

Inherits:
PassiveCodeCheck show all
Includes:
Cc1::InterpreterMediator, Cc1::InterpreterOptions, Cc1::SyntaxNodeCollector
Defined in:
lib/adlint/exam/c_builtin/cc1_check.rb

Constant Summary

Constants included from Cc1::InterpreterOptions

Cc1::InterpreterOptions::QUIET, Cc1::InterpreterOptions::WITHOUT_SIDE_EFFECTS

Instance Method Summary collapse

Methods included from Cc1::SyntaxNodeCollector

collect_additive_expressions, collect_array_declarators, collect_compound_assignment_expressions, collect_constant_specifiers, collect_equality_expressions, collect_function_declarators, collect_generic_labeled_statements, collect_goto_statements, collect_identifier_declarators, collect_if_else_statements, collect_if_statements, collect_logical_and_expressions, collect_logical_or_expressions, collect_object_specifiers, collect_postfix_decrement_expressions, collect_postfix_increment_expressions, collect_prefix_decrement_expressions, collect_prefix_increment_expressions, collect_relational_expressions, collect_simple_assignment_expressions, collect_typedef_type_specifiers

Methods included from Cc1::InterpreterMediator

#constant_expression?, #current_branch, #interpret, #object_to_pointer, #object_to_variable, #pointer_value_of, #reset_environment, #scalar_value_of, #scalar_value_of_arbitrary, #scalar_value_of_false, #scalar_value_of_null, #scalar_value_of_true, #value_of

Methods included from Cc1::InterpSyntaxBridge

#_interp_syntax_bridge_

Methods included from Cc1::InterpObjectBridge

#_interp_object_bridge_

Methods included from ArithmeticAccessor

#arithmetic, #logical_right_shift?

Methods included from Cc1::FunctionTableMediator

#declare_explicit_function, #declare_implicit_function, #define_anonymous_function, #define_explicit_function

Methods included from Cc1::VariableTableMediator

#create_tmpvar, #local_variables

Methods included from Cc1::MemoryPoolMediator

#pointee_of

Methods inherited from CodeCheck

message_id, message_name, #message_name, must_be_deferred?, must_be_unique?, required?

Methods inherited from AdLint::Examination

catalog, #execute, registrant_phase_class, required?

Methods included from LogUtil

#log_debug, #log_error, #log_fatal, #log_info, #log_warn

Methods included from ReportUtil

#create_context_message, #write_FL_FUNC, #write_FL_STMT, #write_FN_CALL, #write_FN_CSUB, #write_FN_CYCM, #write_FN_GOTO, #write_FN_LINE, #write_FN_NEST, #write_FN_PARA, #write_FN_PATH, #write_FN_RETN, #write_FN_STMT, #write_FN_UELS, #write_FN_UNRC, #write_FN_UNUV, #write_assignment, #write_error_message, #write_funcall, #write_fundcl, #write_fundef, #write_gvardcl, #write_include, #write_initialization, #write_labeldef, #write_literal, #write_macrodef, #write_pp_directive, #write_typedcl, #write_vardef, #write_warning_message, #write_xref_function, #write_xref_variable

Constructor Details

#initialize(phase_ctxt) ⇒ W0705



16435
16436
16437
16438
16439
16440
# File 'lib/adlint/exam/c_builtin/cc1_check.rb', line 16435

def initialize(phase_ctxt)
  super
  @interp = phase_ctxt[:cc1_interpreter]
  @interp.on_array_subscript_expr_evaled += T(:check_array_subscript)
  @interp.on_indirection_expr_evaled     += T(:check_indirection)
end