Flag_cocci.include_options -> 'a) = fun xs choose_includes ->
match choose_includes with
Flag_cocci.I_UNSPECIFIED -> failwith "not possible"
- | Flag_cocci.I_NO_INCLUDES -> []
+ | Flag_cocci.I_NO_INCLUDES -> !Flag_cocci.extra_includes
| x ->
let all_includes =
List.mem x
)
| _ -> None))
+> List.concat
- +> (fun x -> (List.rev (Common.uniq (List.rev x)))) (*uniq keeps last*)
+ +> (fun x ->
+ (List.rev
+ (Common.uniq
+ (!Flag_cocci.extra_includes@(List.rev x)))))(*uniq keeps last*)
let rec interpret_dependencies local global = function
Ast_cocci.Dep s -> List.mem s local
match c with
| Ast_c.Local x -> Left (x, aref)
| Ast_c.NonLocal x -> Right (x, aref)
- | Ast_c.Weird x -> raise Impossible
+ | Ast_c.Weird x -> raise (Impossible 161)
) in
update_rel_pos_bis locals;
fixed_flow
)
in
-
{
ast_c = c; (* contain refs so can be modified *)
- tokens_c = tokens;
+ tokens_c = tokens;
fullstring = fullstr;
flow = flow;
all_typedefs = typedefs;
all_macros = macros;
- }
- )
+ })
let groups = Common.group_assoc_bykey_eff xs in
groups +> Common.map_filter (fun (file, xs) ->
match xs with
- | [] -> raise Impossible
+ | [] -> raise (Impossible 162)
| [res] -> Some (file, res)
| res::xs ->
match res with