Class: AdLint::Cc1::NamedVariable
- Inherits:
-
OuterVariable
- Object
- Object
- TypedObject
- Variable
- ScopedVariable
- OuterVariable
- AdLint::Cc1::NamedVariable
- Includes:
- Nameable
- Defined in:
- lib/adlint/cc1/object.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Nameable
Attributes inherited from OuterVariable
Attributes inherited from ScopedVariable
Attributes inherited from TypedObject
Attributes inherited from Object
Attributes included from Bindable
Instance Method Summary collapse
- #designated_by_lvalue? ⇒ Boolean
-
#initialize(mem, dcl_or_def, scope) ⇒ NamedVariable
constructor
A new instance of NamedVariable.
- #pretty_print(pp) ⇒ Object
- #temporary? ⇒ Boolean
-
#to_named_variable ⇒ Object
NOTE: This method should be overridden by PhantomVariable.
Methods included from Nameable
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?, #function?, #named?, #storage_class_specifiers, #variable?
Methods included from Bindable
Constructor Details
#initialize(mem, dcl_or_def, scope) ⇒ NamedVariable
Returns a new instance of NamedVariable.
515 516 517 518 |
# File 'lib/adlint/cc1/object.rb', line 515 def initialize(mem, dcl_or_def, scope) self.name = dcl_or_def.identifier.value super(mem, dcl_or_def, dcl_or_def.type, scope) end |
Instance Method Details
#designated_by_lvalue? ⇒ Boolean
524 525 526 |
# File 'lib/adlint/cc1/object.rb', line 524 def designated_by_lvalue? true end |
#pretty_print(pp) ⇒ Object
533 534 535 |
# File 'lib/adlint/cc1/object.rb', line 533 def pretty_print(pp) Summary.new(object_id, name, type, binding.memory).pretty_print(pp) end |
#temporary? ⇒ Boolean
520 521 522 |
# File 'lib/adlint/cc1/object.rb', line 520 def temporary? false end |
#to_named_variable ⇒ Object
NOTE: This method should be overridden by PhantomVariable.
529 530 531 |
# File 'lib/adlint/cc1/object.rb', line 529 def to_named_variable self end |