~ubuntu-branches/ubuntu/maverick/coccinelle/maverick

« back to all changes in this revision

Viewing changes to parsing_cocci/ast0_cocci.ml

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2009-08-10 01:01:24 UTC
  • mfrom: (7.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090810010124-9fn4c8m93ic60fqx
Tags: 0.1.9.deb-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/control: build-depend on python2.6-dev,
    set XB-Python-Version to 2.6
* New upstream (Debian) packaging applied fix for
  LP: #410907 (see changelog entry below)

Show diffs side-by-side

added added

removed removed

Lines of Context:
558
558
        Id(tag) ->
559
559
          Type_cocci.StructUnionName(structUnion su,false,unwrap_mcode tag)
560
560
      | MetaId(tag,_,_) ->
561
 
          (Printf.printf
 
561
          (Common.pr2
562
562
             "warning: struct/union with a metavariable name detected.\n";
563
 
           Printf.printf
 
563
           Common.pr2
564
564
             "For type checking assuming the name of the metavariable is the name of the type\n";
565
565
           let (rule,tag) = unwrap_mcode tag in
566
566
           Type_cocci.StructUnionName(structUnion su,true,rule^tag))
570
570
  | TypeName(name) -> Type_cocci.TypeName(unwrap_mcode name)
571
571
  | MetaType(name,_) ->
572
572
      Type_cocci.MetaType(unwrap_mcode name,Type_cocci.Unitary,false)
573
 
  | DisjType(_,types,_,_) -> failwith "unexpected DisjType"
 
573
  | DisjType(_,types,_,_) ->
 
574
      Common.pr2_once
 
575
        "disjtype not supported in smpl type inference, assuming unknown";
 
576
      Type_cocci.Unknown
574
577
  | OptType(ty) | UniqueType(ty) ->
575
578
      ast0_type_to_type ty
576
579