X-Git-Url: https://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/785a3008ddade80f642257bb47d43158ac8b8311..HEAD:/engine/check_exhaustive_pattern.ml diff --git a/engine/check_exhaustive_pattern.ml b/engine/check_exhaustive_pattern.ml index 5cea731..234b95b 100644 --- a/engine/check_exhaustive_pattern.ml +++ b/engine/check_exhaustive_pattern.ml @@ -1,3 +1,30 @@ +(* + * Copyright 2012, INRIA + * Julia Lawall, Gilles Muller + * Copyright 2010-2011, INRIA, University of Copenhagen + * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix + * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen + * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix + * This file is part of Coccinelle. + * + * Coccinelle is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, according to version 2 of the License. + * + * Coccinelle is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Coccinelle. If not, see . + * + * The authors reserve the right to distribute this or future versions of + * Coccinelle under other licenses. + *) + + +# 0 "./check_exhaustive_pattern.ml" (* Just to warn me when there is some news in the types in * ast_cocci.ml or even ast_c.ml, so that I can then adjust my code in @@ -31,7 +58,7 @@ let dumb_astcocci_rule_elem = function | A.WhileHeader (_, _, ea, _) -> () | A.DoHeader _ -> () | A.WhileTail (_,_,ea,_,_) -> () - | A.ForHeader (_, _, ea1opt, _, ea2opt, _, ea3opt, _) -> () + | A.ForHeader (_, _, _, ea2opt, _, ea3opt, _) -> () | A.IteratorHeader (ia1, ia2, ea, ia3) -> () | A.SwitchHeader _ -> () | A.Break _ -> () @@ -41,6 +68,7 @@ let dumb_astcocci_rule_elem = function | A.Return _ -> () | A.ReturnExpr (_, ea, _) -> () | A.DefineHeader _ -> () + | A.Undef _ -> () | A.Include _ -> () | A.Default _ -> () | A.Case _ -> () @@ -51,28 +79,35 @@ let dumb_astcocci_decl = function | A.Init (stg, typa, sa, _, expa, _) -> () | A.TyDecl (typa, _) -> () | A.MacroDecl(fn, _, eas, _, _) -> () + | A.MacroDeclInit(fn, _, eas, _, _, _, _) -> () | A.Ddots(dots,whencode) -> () | A.MetaDecl _ -> () | A.MetaField _ -> () + | A.MetaFieldList _ -> () + | A.AsDecl _ -> () | A.Typedef(d,ty1,ty2,pv) -> () | A.DisjDecl xs -> () | A.OptDecl _ | A.UniqueDecl _ -> () -let dumb_astcocci_initialiser = function +let dumb_astcocci_initialiser = function (* seems same as the above *) A.Init(stg,ty,id,eq,ini,sem) -> () | A.UnInit(stg,ty,id,sem) -> () | A.MacroDecl(fn, _, eas, _, _) -> () + | A.MacroDeclInit(fn, _, eas, _, _, _, _) -> () | A.TyDecl(ty,sem) -> () | A.Typedef(d,ty1,ty2,pv) -> () | A.DisjDecl(decls) -> () | A.Ddots(dots,whencode) -> () | A.MetaDecl(name,_,_) -> () | A.MetaField(name,_,_) -> () + | A.MetaFieldList(name,_,_,_) -> () + | A.AsDecl(_,_) -> () | A.OptDecl(decl) -> () | A.UniqueDecl(decl) -> () let dumb_astcocci_expr = function | A.MetaExpr (ida,_,_, opttypa, _, _) -> () + | A.AsExpr (_,_) -> () | A.Edots (_,_) -> () | A.MetaErr _ -> () | A.Ident ida -> () @@ -82,6 +117,7 @@ let dumb_astcocci_expr = function | A.Constant (A.Float sa,_,_,_) -> () | A.FunCall (ea1, _, eas, _) -> () | A.Assignment (ea1, opa, ea2, _) -> () + | A.Sequence (ea1, opa, ea2) -> () | A.CondExpr (ea1,_,ea2opt,_,ea3) -> () | A.Postfix (ea, opa) -> () | A.Infix (ea, opa) -> () @@ -95,6 +131,7 @@ let dumb_astcocci_expr = function | A.SizeOfExpr (_, ea) -> () | A.SizeOfType (_, _, typa, _) -> () | A.TypeExp (typa) -> () + | A.Constructor (_, typa, _, ia) -> () | A.Paren (_, ea, _) -> () | A.NestExpr _ -> () | A.MetaExprList _ -> () @@ -106,7 +143,8 @@ let dumb_astcocci_expr = function | A.OptExp _ -> () let dumb_astcocci_fulltype = function - A.Type(cv,ty) -> () + A.Type(_,cv,ty) -> () + | A.AsType(_,_) -> () | A.DisjType(types) -> () | A.OptType(ty) -> () | A.UniqueType(ty) -> () @@ -120,6 +158,7 @@ let dumb_astcocci_type = function | A.FunctionType _ -> () | A.Array (typa, _, eaopt, _) -> () | A.EnumName(en, ena) -> () + | A.EnumDef(ty, lb, ids, rb) -> () | A.StructUnionName(sa, sua) -> () | A.StructUnionDef(ty, lb, decls, rb) -> () | A.TypeName sa -> ()