Class: AdLint::Cc1::ArrayElementVariable

Inherits:
InnerVariable show all
Defined in:
lib/adlint/cc1/object.rb

Instance Attribute Summary

Attributes inherited from InnerVariable

#component_name, #owner

Attributes included from Nameable

#name

Attributes inherited from OuterVariable

#representative_element

Attributes inherited from ScopedVariable

#scope

Attributes inherited from TypedObject

#type

Attributes inherited from Object

#declarations_and_definitions

Attributes included from Bindable

#binding

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from InnerVariable

#declared_as_auto?, #declared_as_extern?, #declared_as_register?, #declared_as_static?, #designated_by_lvalue?, #inner?, #named?, #storage_class_specifiers, #temporary?, #to_named_variable

Methods included from Nameable

#named?

Methods inherited from OuterVariable

#assign!, #begin_value_versioning, #end_value_versioning, #enter_value_versioning_group, #inner?, #inner_variable_at, #inner_variable_named, #leave_value_versioning_group, #rollback_all_value_versions!, #thin_latest_value_version!

Methods inherited from ScopedVariable

#declared_as_auto?, #declared_as_extern?

Methods inherited from Variable

#assign!, #begin_value_versioning, #end_value_versioning, #enter_value_versioning_group, #function?, #inner?, #leave_value_versioning_group, #name, #named?, #narrow_value_domain!, #outer?, #rollback_all_value_versions!, #thin_latest_value_version!, #uninitialize!, #value, #variable?, #widen_value_domain!

Methods inherited from TypedObject

#to_pointer, #to_pointer_value, #to_value, #to_variable

Methods inherited from Object

#declared_as_auto?, #declared_as_extern?, #declared_as_register?, #declared_as_static?, #designated_by_lvalue?, #function?, #named?, #storage_class_specifiers, #temporary?, #variable?

Methods included from Bindable

#be_alias_to, #bind_to

Constructor Details

#initialize(mem, outer_var, type, idx) ⇒ ArrayElementVariable

Returns a new instance of ArrayElementVariable.



634
635
636
# File 'lib/adlint/cc1/object.rb', line 634

def initialize(mem, outer_var, type, idx)
  super(mem, outer_var, type, self.class.component_name_of(idx))
end

Class Method Details

.component_name_of(idx) ⇒ Object



630
631
632
# File 'lib/adlint/cc1/object.rb', line 630

def self.component_name_of(idx)
  "[#{idx}]"
end