class AdLint::Cc1::PrintfFormat::Conversion_p

Public Class Methods

suitable_conversion_specifier_character() click to toggle source
# File lib/adlint/cc1/format.rb, line 1380
def self.suitable_conversion_specifier_character
  "p"
end

Public Instance Methods

max_length() click to toggle source
# File lib/adlint/cc1/format.rb, line 1390
def max_length
  # NOTE: `%p' conversion specifier of the Ruby's builtin sprintf does
  #       not convert the argument.
  ("%##{flags}#{field_width}#{precision}x" % conversion_type.max).length
end
min_length() click to toggle source
# File lib/adlint/cc1/format.rb, line 1384
def min_length
  # NOTE: `%p' conversion specifier of the Ruby's builtin sprintf does
  #       not convert the argument.
  ("%##{flags}#{field_width}#{precision}x" % 0).length
end

Private Instance Methods

argument_types() click to toggle source
# File lib/adlint/cc1/format.rb, line 1401
def argument_types
  if conversion_argument && conversion_argument.type.pointer?
    [conversion_argument.type.unqualify]
  else
    [pointer_type(qualified_type(void_t, :const))]
  end
end
conversion_type() click to toggle source
# File lib/adlint/cc1/format.rb, line 1413
def conversion_type
  pointer_type(void_t)
end
default_precision_value() click to toggle source
# File lib/adlint/cc1/format.rb, line 1397
def default_precision_value
  0
end
suitable_length_modifiers() click to toggle source
# File lib/adlint/cc1/format.rb, line 1409
def suitable_length_modifiers
  []
end