class AdLint::Cc1::ScalarDataType
Attributes
bit_alignment[R]
bit_size[R]
Public Class Methods
new(type_tbl, name, bit_size, bit_align, type_dcls = [])
click to toggle source
Calls superclass method
AdLint::Cc1::Type::new
# File lib/adlint/cc1/type.rb, line 2992 def initialize(type_tbl, name, bit_size, bit_align, type_dcls = []) super(type_tbl, name, type_dcls) @bit_size = bit_size @bit_alignment = bit_align end
Public Instance Methods
_arithmetic_type_with_array(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3378 def _arithmetic_type_with_array(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end
_arithmetic_type_with_bitfield(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3366 def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_char(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3250 def _arithmetic_type_with_char(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_double(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3358 def _arithmetic_type_with_double(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_enum(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3370 def _arithmetic_type_with_enum(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3390 def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) # NOTE: Binary operation with ExtendedBigIntType and any scalar type # makes ExtendedBigIntType. lhs_type end
_arithmetic_type_with_float(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3354 def _arithmetic_type_with_float(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_function(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3246 def _arithmetic_type_with_function(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end
_arithmetic_type_with_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3286 def _arithmetic_type_with_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_long(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3306 def _arithmetic_type_with_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_long_double(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3362 def _arithmetic_type_with_long_double(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_long_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3318 def _arithmetic_type_with_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_long_long(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3330 def _arithmetic_type_with_long_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_long_long_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3342 def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_pointer(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3374 def _arithmetic_type_with_pointer(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_short(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3262 def _arithmetic_type_with_short(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_short_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3274 def _arithmetic_type_with_short_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3290 def _arithmetic_type_with_signed(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_char(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3254 def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3294 def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_long(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3310 def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3322 def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3334 def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3346 def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_short(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3266 def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3278 def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_struct(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3382 def _arithmetic_type_with_struct(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end
_arithmetic_type_with_undeclared(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3234 def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end
_arithmetic_type_with_union(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3386 def _arithmetic_type_with_union(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end
_arithmetic_type_with_unresolved(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3238 def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end
_arithmetic_type_with_unsigned(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3298 def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3258 def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3302 def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3314 def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3326 def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3338 def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3350 def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3270 def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3282 def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) do_usual_arithmetic_type_conversion(lhs_type, rhs_type) end
_arithmetic_type_with_void(lhs_type, rhs_type = self)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3242 def _arithmetic_type_with_void(lhs_type, rhs_type = self) rhs_type.arithmetic_type_with(lhs_type) end
arbitrary_value()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3173 def arbitrary_value ScalarValue.of_arbitrary(logical_right_shift?) end
argument_promoted_type()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3226 def argument_promoted_type subclass_responsibility end
arithmetic_type_with(type)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3230 def arithmetic_type_with(type) subclass_responsibility end
array?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3053 def array? false end
base_type()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3025 def base_type nil end
bitfield?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3113 def bitfield? subclass_responsibility end
brief_image()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3009 def brief_image subclass_responsibility end
coerce_array_value(val)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3196 def coerce_array_value(val) fst_val = val.values.first fst_val = fst_val.values.first until fst_val && fst_val.scalar? if fst_val && fst_val.scalar? coerce_scalar_value(fst_val) else undefined_value end end
coerce_composite_value(val)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3207 def coerce_composite_value(val) fst_val = val.values.first fst_val = fst_val.values.first until fst_val && fst_val.scalar? if fst_val && fst_val.scalar? coerce_scalar_value(fst_val) else undefined_value end end
coerce_scalar_value(val)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3189 def coerce_scalar_value(val) val.dup.tap do |v| v.narrow_domain!(Operator::EQ, ScalarValue.of(min..max, logical_right_shift?)) end end
coercible?(to_type)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3037 def coercible?(to_type) to_type.scalar? end
compatible?(to_type)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3033 def compatible?(to_type) subclass_responsibility end
const?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3101 def const? false end
corresponding_signed_type()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3396 def corresponding_signed_type subclass_responsibility end
corresponding_unsigned_type()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3400 def corresponding_unsigned_type subclass_responsibility end
dup()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3404 def dup subclass_responsibility end
enum?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3077 def enum? subclass_responsibility end
enumerators()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3137 def enumerators subclass_responsibility end
explicitly_signed?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3121 def explicitly_signed? subclass_responsibility end
floating?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3049 def floating? subclass_responsibility end
function?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3073 def function? false end
have_va_list?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3125 def have_va_list? false end
id()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3001 def id subclass_responsibility end
image()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3005 def image subclass_responsibility end
impl_length()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3145 def impl_length 0 end
integer?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3045 def integer? subclass_responsibility end
integer_conversion_rank()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3218 def integer_conversion_rank subclass_responsibility end
integer_promoted_type()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3222 def integer_promoted_type subclass_responsibility end
length()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3141 def length 0 end
location()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3013 def location subclass_responsibility end
max()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3161 def max subclass_responsibility end
member_named(name)
click to toggle source
# File lib/adlint/cc1/type.rb, line 3153 def member_named(name) nil end
members()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3149 def members [] end
min()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3157 def min subclass_responsibility end
named?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3017 def named? subclass_responsibility end
nil_value()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3165 def nil_value ScalarValue.of_nil(logical_right_shift?) end
parameter_types()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3133 def parameter_types [] end
parameter_value()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3181 def parameter_value ScalarValue.of(min..max, logical_right_shift?) end
pointer?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3065 def pointer? subclass_responsibility end
qualified?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3069 def qualified? false end
real_type()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3021 def real_type self end
restrict?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3109 def restrict? false end
return_type()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3129 def return_type nil end
return_value()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3185 def return_value ScalarValue.of(min..max, logical_right_shift?) end
scalar?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3041 def scalar? true end
signed?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3117 def signed? subclass_responsibility end
standard?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3089 def standard? subclass_responsibility end
struct?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3057 def struct? false end
undeclared?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3093 def undeclared? false end
undefined_value()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3177 def undefined_value ScalarValue.of_undefined(min..max, logical_right_shift?) end
union?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3061 def union? false end
unqualify()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3029 def unqualify self end
unresolved?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3097 def unresolved? false end
user?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3081 def user? false end
void?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3085 def void? false end
volatile?()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3105 def volatile? false end
zero_value()
click to toggle source
# File lib/adlint/cc1/type.rb, line 3169 def zero_value ScalarValue.of(0, logical_right_shift?) end