class AdLint::Cc1::Type

DESCRIPTION

Type class hierarchy

Type
  <-- UndeclaredType
  <-- UnresolvedType
  <-- QualifiedType
  <-- VoidType
  <-- FunctionType
  <-- ScalarDataType --------> UsualArithmeticTypeConversion <<module>>
        <-- IntegerType
              <-- StandardIntegerType
                    <-- CharType
                    <-- SignedCharType
                    <-- UnsignedCharType
                    <-- ShortType
                    <-- SignedShortType
                    <-- UnsignedShortType
                    <-- ShortIntType
                    <-- SignedShortIntType
                    <-- UnsignedShortIntType
                    <-- IntType
                    <-- SignedType
                    <-- SignedIntType
                    <-- UnsignedType
                    <-- UnsignedIntType
                    <-- LongType
                    <-- SignedLongType
                    <-- UnsignedLongType
                    <-- LongIntType
                    <-- SignedLongIntType
                    <-- UnsignedLongIntType
                    <-- LongLongType
                    <-- SignedLongLongType
                    <-- UnsignedLongLongType
                    <-- LongLongIntType
                    <-- SignedLongLongIntType
                    <-- UnsignedLongLongIntType
              <-- ExtendedBigIntType
              <-- BitfieldType
              <-- EnumType ----------------------> Scopeable <<module>>
              <-- PointerType                          ^
        <-- FloatingType                               |
              <-- StandardFloatingType                 |
                    <-- FloatType                      |
                    <-- DoubleType                     |
                    <-- LongDoubleType                 |
  <-- ArrayType                                        |
  <-- CompositeDataType -------------------------------+
        <-- StructType                                 |
        <-- UnionType                                  |
  <-- UserType ----------------------------------------+
  <-- ParameterType -----------------------------------+

Attributes

declarations[R]
name[R]
type_table[R]

Public Class Methods

new(type_tbl, name, type_dcls = []) click to toggle source
# File lib/adlint/cc1/type.rb, line 141
def initialize(type_tbl, name, type_dcls = [])
  @type_table   = type_tbl
  @name         = name
  @declarations = type_dcls
end

Public Instance Methods

==(rhs_type) click to toggle source
Calls superclass method
# File lib/adlint/cc1/type.rb, line 591
def ==(rhs_type)
  case rhs_type
  when Type
    id == rhs_type.id
  else
    super
  end
end
_arithmetic_type_with_array(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 567
def _arithmetic_type_with_array(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_bitfield(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 555
def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_char(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 439
def _arithmetic_type_with_char(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_double(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 547
def _arithmetic_type_with_double(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_enum(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 559
def _arithmetic_type_with_enum(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 579
def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_float(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 543
def _arithmetic_type_with_float(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_function(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 435
def _arithmetic_type_with_function(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 475
def _arithmetic_type_with_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_long(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 495
def _arithmetic_type_with_long(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_long_double(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 551
def _arithmetic_type_with_long_double(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_long_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 507
def _arithmetic_type_with_long_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_long_long(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 519
def _arithmetic_type_with_long_long(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 531
def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_pointer(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 563
def _arithmetic_type_with_pointer(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_short(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 451
def _arithmetic_type_with_short(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_short_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 463
def _arithmetic_type_with_short_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 479
def _arithmetic_type_with_signed(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_char(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 443
def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 483
def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_long(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 499
def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 511
def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 523
def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 535
def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_short(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 455
def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 467
def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_struct(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 571
def _arithmetic_type_with_struct(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_undeclared(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 423
def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_union(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 575
def _arithmetic_type_with_union(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unresolved(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 427
def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 487
def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 447
def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 491
def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 503
def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 515
def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 527
def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 539
def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 459
def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 471
def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self)
  subclass_responsibility
end
_arithmetic_type_with_void(lhs_type, rhs_type = self) click to toggle source
# File lib/adlint/cc1/type.rb, line 431
def _arithmetic_type_with_void(lhs_type, rhs_type = self)
  subclass_responsibility
end
aligned_bit_size() click to toggle source
# File lib/adlint/cc1/type.rb, line 187
def aligned_bit_size
  bit_size + (bit_alignment - bit_size)
end
aligned_byte_size() click to toggle source
# File lib/adlint/cc1/type.rb, line 191
def aligned_byte_size
  (aligned_bit_size / 8.0).ceil
end
arbitrary_value() click to toggle source
# File lib/adlint/cc1/type.rb, line 379
def arbitrary_value
  subclass_responsibility
end
argument_promoted_type() click to toggle source
# File lib/adlint/cc1/type.rb, line 415
def argument_promoted_type
  subclass_responsibility
end
arithmetic_type_with(type) click to toggle source
# File lib/adlint/cc1/type.rb, line 419
def arithmetic_type_with(type)
  subclass_responsibility
end
array?() click to toggle source
# File lib/adlint/cc1/type.rb, line 247
def array?
  subclass_responsibility
end
base_type() click to toggle source
# File lib/adlint/cc1/type.rb, line 199
def base_type
  subclass_responsibility
end
bit_alignment() click to toggle source
# File lib/adlint/cc1/type.rb, line 179
def bit_alignment
  subclass_responsibility
end
bit_size() click to toggle source
# File lib/adlint/cc1/type.rb, line 171
def bit_size
  subclass_responsibility
end
bitfield?() click to toggle source
# File lib/adlint/cc1/type.rb, line 311
def bitfield?
  subclass_responsibility
end
brief_image() click to toggle source
# File lib/adlint/cc1/type.rb, line 159
def brief_image
  subclass_responsibility
end
byte_alignment() click to toggle source
# File lib/adlint/cc1/type.rb, line 183
def byte_alignment
  (bit_alignment / 8.0).ceil
end
byte_size() click to toggle source
# File lib/adlint/cc1/type.rb, line 175
def byte_size
  (bit_size / 8.0).ceil
end
coerce_array_value(val) click to toggle source
# File lib/adlint/cc1/type.rb, line 399
def coerce_array_value(val)
  subclass_responsibility
end
coerce_composite_value(val) click to toggle source
# File lib/adlint/cc1/type.rb, line 403
def coerce_composite_value(val)
  subclass_responsibility
end
coerce_scalar_value(val) click to toggle source
# File lib/adlint/cc1/type.rb, line 395
def coerce_scalar_value(val)
  subclass_responsibility
end
coercible?(to_type) click to toggle source
# File lib/adlint/cc1/type.rb, line 215
def coercible?(to_type)
  subclass_responsibility
end
compatible?(to_type) click to toggle source
# File lib/adlint/cc1/type.rb, line 211
def compatible?(to_type)
  subclass_responsibility
end
composite?() click to toggle source
# File lib/adlint/cc1/type.rb, line 251
def composite?
  struct? || union?
end
const?() click to toggle source
# File lib/adlint/cc1/type.rb, line 299
def const?
  subclass_responsibility
end
convertible?(to_type) click to toggle source
# File lib/adlint/cc1/type.rb, line 219
def convertible?(to_type)
  self.same_as?(to_type)
end
corresponding_signed_type() click to toggle source
# File lib/adlint/cc1/type.rb, line 583
def corresponding_signed_type
  subclass_responsibility
end
corresponding_unsigned_type() click to toggle source
# File lib/adlint/cc1/type.rb, line 587
def corresponding_unsigned_type
  subclass_responsibility
end
dup() click to toggle source
# File lib/adlint/cc1/type.rb, line 600
def dup
  subclass_responsibility
end
enum?() click to toggle source
# File lib/adlint/cc1/type.rb, line 275
def enum?
  subclass_responsibility
end
enumerators() click to toggle source
# File lib/adlint/cc1/type.rb, line 339
def enumerators
  subclass_responsibility
end
explicitly_signed?() click to toggle source
# File lib/adlint/cc1/type.rb, line 323
def explicitly_signed?
  subclass_responsibility
end
floating?() click to toggle source
# File lib/adlint/cc1/type.rb, line 243
def floating?
  subclass_responsibility
end
function?() click to toggle source
# File lib/adlint/cc1/type.rb, line 271
def function?
  subclass_responsibility
end
have_va_list?() click to toggle source
# File lib/adlint/cc1/type.rb, line 327
def have_va_list?
  subclass_responsibility
end
id() click to toggle source
# File lib/adlint/cc1/type.rb, line 151
def id
  subclass_responsibility
end
image() click to toggle source
# File lib/adlint/cc1/type.rb, line 155
def image
  subclass_responsibility
end
impl_length() click to toggle source
# File lib/adlint/cc1/type.rb, line 351
def impl_length
  subclass_responsibility
end
incomplete?() click to toggle source
# File lib/adlint/cc1/type.rb, line 207
def incomplete?
  subclass_responsibility
end
inspect() click to toggle source
# File lib/adlint/cc1/type.rb, line 604
def inspect
  if @name == image
    if location
      "#{@name} (#{location.inspect})"
    else
      @name
    end
  else
    if location
      "#{@name}=>#{image} (#{location.inspect})"
    else
      "#{@name}=>#{image}"
    end
  end
end
integer?() click to toggle source
# File lib/adlint/cc1/type.rb, line 239
def integer?
  subclass_responsibility
end
integer_conversion_rank() click to toggle source
# File lib/adlint/cc1/type.rb, line 407
def integer_conversion_rank
  subclass_responsibility
end
integer_promoted_type() click to toggle source
# File lib/adlint/cc1/type.rb, line 411
def integer_promoted_type
  subclass_responsibility
end
length() click to toggle source
# File lib/adlint/cc1/type.rb, line 343
def length
  subclass_responsibility
end
length=(len) click to toggle source
# File lib/adlint/cc1/type.rb, line 347
def length=(len)
  subclass_responsibility
end
location() click to toggle source
# File lib/adlint/cc1/type.rb, line 163
def location
  subclass_responsibility
end
max() click to toggle source
# File lib/adlint/cc1/type.rb, line 367
def max
  subclass_responsibility
end
member_named(name) click to toggle source
# File lib/adlint/cc1/type.rb, line 359
def member_named(name)
  subclass_responsibility
end
members() click to toggle source
# File lib/adlint/cc1/type.rb, line 355
def members
  subclass_responsibility
end
min() click to toggle source
# File lib/adlint/cc1/type.rb, line 363
def min
  subclass_responsibility
end
more_cv_qualified?(than_type) click to toggle source
# File lib/adlint/cc1/type.rb, line 223
def more_cv_qualified?(than_type)
  false
end
named?() click to toggle source
# File lib/adlint/cc1/type.rb, line 167
def named?
  subclass_responsibility
end
nil_value() click to toggle source
# File lib/adlint/cc1/type.rb, line 371
def nil_value
  subclass_responsibility
end
parameter?() click to toggle source
# File lib/adlint/cc1/type.rb, line 231
def parameter?
  false
end
parameter_types() click to toggle source
# File lib/adlint/cc1/type.rb, line 335
def parameter_types
  subclass_responsibility
end
parameter_value() click to toggle source
# File lib/adlint/cc1/type.rb, line 387
def parameter_value
  subclass_responsibility
end
pointer?() click to toggle source
# File lib/adlint/cc1/type.rb, line 263
def pointer?
  subclass_responsibility
end
qualified?() click to toggle source
# File lib/adlint/cc1/type.rb, line 267
def qualified?
  subclass_responsibility
end
real_type() click to toggle source
# File lib/adlint/cc1/type.rb, line 195
def real_type
  subclass_responsibility
end
restrict?() click to toggle source
# File lib/adlint/cc1/type.rb, line 307
def restrict?
  subclass_responsibility
end
return_type() click to toggle source
# File lib/adlint/cc1/type.rb, line 331
def return_type
  subclass_responsibility
end
return_value() click to toggle source
# File lib/adlint/cc1/type.rb, line 391
def return_value
  subclass_responsibility
end
same_as?(type) click to toggle source
# File lib/adlint/cc1/type.rb, line 227
def same_as?(type)
  self.real_type.unqualify == type.real_type.unqualify
end
scalar?() click to toggle source
# File lib/adlint/cc1/type.rb, line 235
def scalar?
  subclass_responsibility
end
signed?() click to toggle source
# File lib/adlint/cc1/type.rb, line 315
def signed?
  subclass_responsibility
end
standard?() click to toggle source
# File lib/adlint/cc1/type.rb, line 287
def standard?
  subclass_responsibility
end
struct?() click to toggle source
# File lib/adlint/cc1/type.rb, line 255
def struct?
  subclass_responsibility
end
undeclared?() click to toggle source
# File lib/adlint/cc1/type.rb, line 291
def undeclared?
  subclass_responsibility
end
undefined_value() click to toggle source
# File lib/adlint/cc1/type.rb, line 383
def undefined_value
  subclass_responsibility
end
union?() click to toggle source
# File lib/adlint/cc1/type.rb, line 259
def union?
  subclass_responsibility
end
unqualify() click to toggle source
# File lib/adlint/cc1/type.rb, line 203
def unqualify
  subclass_responsibility
end
unresolved?() click to toggle source
# File lib/adlint/cc1/type.rb, line 295
def unresolved?
  subclass_responsibility
end
unsigned?() click to toggle source
# File lib/adlint/cc1/type.rb, line 319
def unsigned?
  !signed?
end
user?() click to toggle source
# File lib/adlint/cc1/type.rb, line 279
def user?
  subclass_responsibility
end
void?() click to toggle source
# File lib/adlint/cc1/type.rb, line 283
def void?
  subclass_responsibility
end
volatile?() click to toggle source
# File lib/adlint/cc1/type.rb, line 303
def volatile?
  subclass_responsibility
end
zero_value() click to toggle source
# File lib/adlint/cc1/type.rb, line 375
def zero_value
  subclass_responsibility
end