class AdLint::Exam::CBuiltin::TypeDclExtraction

Public Class Methods

new(phase_ctxt) click to toggle source
Calls superclass method AdLint::Examination::new
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 44
def initialize(phase_ctxt)
  super
  trav = phase_ctxt[:cc1_ast_traversal]
  trav.enter_typedef_declaration     += T(:extract_typedef_dcl)
  trav.enter_struct_type_declaration += T(:extract_struct_dcl)
  trav.enter_union_type_declaration  += T(:extract_union_dcl)
  trav.enter_enum_type_declaration   += T(:extract_enum_dcl)
end

Private Instance Methods

do_execute(*) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 55
def do_execute(*) end
do_prepare(*) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 54
def do_prepare(*) end
extract_enum_dcl(enum_type_dcl) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 72
def extract_enum_dcl(enum_type_dcl)
  TYPEDCL(enum_type_dcl.identifier.location, "E",
          enum_type_dcl.type.name, enum_type_dcl.type.image)
end
extract_struct_dcl(struct_type_dcl) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 62
def extract_struct_dcl(struct_type_dcl)
  TYPEDCL(struct_type_dcl.identifier.location, "S",
          struct_type_dcl.type.name, struct_type_dcl.type.image)
end
extract_typedef_dcl(typedef_dcl) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 57
def extract_typedef_dcl(typedef_dcl)
  TYPEDCL(typedef_dcl.identifier.location, "T",
          typedef_dcl.type.name, typedef_dcl.type.image)
end
extract_union_dcl(union_type_dcl) click to toggle source
# File lib/adlint/exam/c_builtin/cc1_code.rb, line 67
def extract_union_dcl(union_type_dcl)
  TYPEDCL(union_type_dcl.identifier.location, "U",
          union_type_dcl.type.name, union_type_dcl.type.image)
end