~npalix/coccinelle/upstream

« back to all changes in this revision

Viewing changes to engine/check_exhaustive_pattern.ml

  • Committer: Nicolas Palix
  • Date: 2010-01-28 14:23:49 UTC
  • Revision ID: git-v1:70d17887795852eca805bfe27745b9810c0a39be
Remove trailing whitespace/tab

svn path=/coccinelle/; revision=8684

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
(* Just to warn me when there is some news in the types in
3
3
 * ast_cocci.ml or even ast_c.ml, so that I can then adjust my code in
4
4
 * pattern.ml or transformation.ml.
5
 
 * 
 
5
 *
6
6
 * For the moment I do it only for myself (pad), that is I check only
7
7
 * for news in ast_cocci.ml, because I already know when I add stuff in
8
8
 * my code in ast_c.ml or control_flow_c.ml. *)
126
126
(* ------------------------------------------------------------------------- *)
127
127
(* for C *)
128
128
(*
129
 
  | (Ident (_) | Constant _ | FunCall (_,_) | CondExpr (_,_,_) 
 
129
  | (Ident (_) | Constant _ | FunCall (_,_) | CondExpr (_,_,_)
130
130
    | Sequence (_,_)
131
 
    | Assignment (_,_,_) 
 
131
    | Assignment (_,_,_)
132
132
    | Postfix (_,_) | Infix (_,_) | Unary (_,_) | Binary (_,_,_)
133
133
    | ArrayAccess (_,_) | RecordAccess (_,_) | RecordPtAccess (_,_)
134
 
    | SizeOfExpr (_) | SizeOfType (_) | Cast (_,_) 
135
 
    | StatementExpr (_) | Constructor 
 
134
    | SizeOfExpr (_) | SizeOfType (_) | Cast (_,_)
 
135
    | StatementExpr (_) | Constructor
136
136
    | ParenExpr (_) | MacroCall (_) | MacroCall2 (_)
137
 
    ),_ -> 
 
137
    ),_ ->
138
138
 
139
 
  | ( Labeled (Label (_,_)) | Labeled (Case  (_,_)) 
 
139
  | ( Labeled (Label (_,_)) | Labeled (Case  (_,_))
140
140
    | Labeled (CaseRange  (_,_,_)) | Labeled (Default _)
141
 
    | Compound _ | ExprStatement _ 
 
141
    | Compound _ | ExprStatement _
142
142
    | Selection  (If (_, _, _)) | Selection  (Switch (_, _))
143
 
    | Iteration  (While (_, _)) | Iteration  (DoWhile (_, _)) 
 
143
    | Iteration  (While (_, _)) | Iteration  (DoWhile (_, _))
144
144
    | Iteration  (For ((_,_), (_,_), (_, _), _))
145
145
    | Jump (Goto _) | Jump ((Continue|Break|Return)) | Jump (ReturnExpr _)
146
146
    | Decl _ | Asm | Selection (IfCpp (_,_))
147
 
    ), _ -> 
 
147
    ), _ ->
148
148
*)
149
149
 
150
 
(* for control flow nodes 
 
150
(* for control flow nodes
151
151
 
152
 
  | ( F.ExprStatement (_, _) 
 
152
  | ( F.ExprStatement (_, _)
153
153
    | F.IfHeader  (_, _) | F.SwitchHeader (_, _)
154
 
    | F.WhileHeader (_, _) | (* F.DoHeader (_, _) | *) F.DoWhileTail (_, _) 
 
154
    | F.WhileHeader (_, _) | (* F.DoHeader (_, _) | *) F.DoWhileTail (_, _)
155
155
    | F.ForHeader (_, _)
156
156
    | F.Return     (_, _)  | F.ReturnExpr (_, _)
157
157
        (* no counter part in cocci *)
158
 
    | F.Label (_, _) 
 
158
    | F.Label (_, _)
159
159
    | F.Case  (_,_) | (* F.CaseRange (_, _) | *) F.Default   (_, _)
160
160
    | F.Goto (_, _) | F.Continue (_, _) | F.Break    (_, _)
161
161
    ) -> raise Impossible