| _ -> []
else [] in
bind (List.rev metas) [metaid name]
+ | Ast.DisjId(ids) -> bind_disj (List.map k ids)
| _ -> option_default) in
let rec type_collect res = function
TC.ConstVol(_,ty) | TC.Pointer(ty) | TC.FunctionPointer(ty)
| TC.Array(ty) -> type_collect res ty
+ | TC.EnumName(TC.MV(tyname,_,_)) ->
+ bind [tyname] res
+ | TC.StructUnionName(_,TC.MV(tyname,_,_)) ->
+ bind [tyname] res
| TC.MetaType(tyname,_,_) ->
bind [tyname] res
| TC.SignedT(_,Some ty) -> type_collect res ty
bind (k d)
(match Ast.unwrap d with
Ast.MetaDecl(name,_,_) | Ast.MetaField(name,_,_) -> [metaid name]
+ | Ast.MetaFieldList(name,Ast.MetaListLen(lenname,_,_),_,_) ->
+ [metaid name;metaid lenname]
+ | Ast.MetaFieldList(name,_,_,_) ->
+ [metaid name]
| Ast.DisjDecl(decls) -> bind_disj (List.map k decls)
| _ -> option_default) in
V.combiner bind option_default
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
- donothing donothing donothing donothing
+ donothing donothing donothing donothing donothing
astfvident astfvexpr astfvfullType astfvtypeC astfvinit astfvparam
astfvdecls astfvrule_elem astfvstatement donothing donothing donothing_a
(match Ast.unwrap i with
Ast.MetaId(name,_,TC.Saved,_)
| Ast.MetaFunc(name,_,TC.Saved,_)
- | Ast.MetaLocalFunc(name,_,TC.Saved,_) ->
- [metaid name]
+ | Ast.MetaLocalFunc(name,_,TC.Saved,_) -> [metaid name]
| _ -> option_default) in
let rec type_collect res = function
TC.ConstVol(_,ty) | TC.Pointer(ty) | TC.FunctionPointer(ty)
| TC.Array(ty) -> type_collect res ty
+ | TC.EnumName(TC.MV(tyname,TC.Saved,_)) ->
+ bind [tyname] res
+ | TC.StructUnionName(_,TC.MV(tyname,TC.Saved,_)) ->
+ bind [tyname] res
| TC.MetaType(tyname,TC.Saved,_) ->
bind [tyname] res
| TC.SignedT(_,Some ty) -> type_collect res ty
let lensaved =
match ls with TC.Saved -> [metaid lenname] | _ -> [] in
lensaved @ namesaved
- | Ast.MetaParamList(name,_,_,_) -> [metaid name]
+ | Ast.MetaParamList(name,_,TC.Saved,_) -> [metaid name]
| _ -> option_default) in
let astfvdecls recursor k d =
(match Ast.unwrap d with
Ast.MetaDecl(name,TC.Saved,_) | Ast.MetaField(name,TC.Saved,_) ->
[metaid name]
+ | Ast.MetaFieldList(name,Ast.MetaListLen (lenname,ls,_),ns,_) ->
+ let namesaved =
+ match ns with TC.Saved -> [metaid name] | _ -> [] in
+ let lensaved =
+ match ls with TC.Saved -> [metaid lenname] | _ -> [] in
+ lensaved @ namesaved
+ | Ast.MetaFieldList(name,_,TC.Saved,_) -> [metaid name]
| _ -> option_default) in
let astfvrule_elem recursor k re =
V.combiner bind option_default
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
- donothing donothing donothing donothing
+ donothing donothing donothing donothing donothing
astfvident astfvexpr donothing astfvtypeC astfvinit astfvparam
astfvdecls astfvrule_elem donothing donothing donothing donothing
V.combiner bind option_default
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
- donothing donothing donothing donothing
+ donothing donothing donothing donothing donothing
donothing donothing donothing donothing donothing donothing
donothing astfvrule_elem astfvstatement donothing donothing donothing
| TC.Pointer(ty) -> TC.Pointer(type_infos ty)
| TC.FunctionPointer(ty) -> TC.FunctionPointer(type_infos ty)
| TC.Array(ty) -> TC.Array(type_infos ty)
+ | TC.EnumName(TC.MV(name,_,_)) ->
+ let (unitary,inherited) = classify (name,(),(),Ast.NoMetaPos) in
+ TC.EnumName(TC.MV(name,unitary,inherited))
+ | TC.StructUnionName(su,TC.MV(name,_,_)) ->
+ let (unitary,inherited) = classify (name,(),(),Ast.NoMetaPos) in
+ TC.StructUnionName(su,TC.MV(name,unitary,inherited))
| TC.MetaType(name,_,_) ->
let (unitary,inherited) = classify (name,(),(),Ast.NoMetaPos) in
Type_cocci.MetaType(name,unitary,inherited)
| Ast.MetaField(name,_,_) ->
let (unitary,inherited) = classify name in
Ast.rewrap e (Ast.MetaField(name,unitary,inherited))
+ | Ast.MetaFieldList(name,Ast.MetaListLen (lenname,_,_),_,_) ->
+ let (unitary,inherited) = classify name in
+ let (lenunitary,leninherited) = classify lenname in
+ Ast.rewrap e
+ (Ast.MetaFieldList
+ (name,Ast.MetaListLen(lenname,lenunitary,leninherited),
+ unitary,inherited))
+ | Ast.MetaFieldList(name,lenname,_,_) ->
+ let (unitary,inherited) = classify name in
+ Ast.rewrap e (Ast.MetaFieldList(name,lenname,unitary,inherited))
| _ -> e in
let rule_elem r k e =
let fn = V.rebuilder
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
- donothing donothing donothing donothing
+ donothing donothing donothing donothing donothing
ident expression donothing typeC init param decl rule_elem
donothing donothing donothing donothing in
V.rebuilder
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
- donothing donothing astfvstatement_dots donothing
+ donothing donothing astfvstatement_dots donothing donothing
donothing donothing donothing donothing donothing donothing donothing
astfvrule_elem astfvstatement astfvcase_line astfvtoplevel donothing
let v =
V.combiner bind option_default
mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode mcode
- donothing donothing donothing donothing
+ donothing donothing donothing donothing donothing
donothing donothing donothing donothing donothing donothing
donothing donothing donothing donothing donothing donothing in
match rule with