Warn of unused constructors

Summary: public

Reviewed By: jvillard

Differential Revision: D2938283

fb-gh-sync-id: e2db32a
shipit-source-id: e2db32a
master
Josh Berdine 9 years ago committed by facebook-github-bot-1
parent 2e4f4a0c5f
commit 89338c86e9

@ -92,6 +92,7 @@ OCAMLBUILD_OPTIONS = \
-cflags -w,@20 \ -cflags -w,@20 \
-cflags -w,@26 \ -cflags -w,@26 \
-cflags -w,@35 \ -cflags -w,@35 \
-cflags -w,@37 \
-cflags -w,@38 \ -cflags -w,@38 \
-cflags -w,@39 \ -cflags -w,@39 \
-tag-line "<*clang/clang_ast_*>: warn(-35-39)" \ -tag-line "<*clang/clang_ast_*>: warn(-35-39)" \

@ -60,9 +60,9 @@ let rel_source_file_from_abs_path root fname =
abs_source_file_from_path fname abs_source_file_from_path fname
type encoding_type = type encoding_type =
Enc_base | Enc_path_with_underscores | Enc_crc [ `Enc_base | `Enc_path_with_underscores | `Enc_crc ]
let curr_encoding = Enc_crc let curr_encoding = `Enc_crc
let source_file_to_string fname = let source_file_to_string fname =
match fname with match fname with
@ -91,11 +91,11 @@ let source_file_to_rel_path fname =
let source_file_encoding source_file = let source_file_encoding source_file =
let source_file_s = source_file_to_string source_file in let source_file_s = source_file_to_string source_file in
match curr_encoding with match curr_encoding with
| Enc_base -> | `Enc_base ->
Filename.basename source_file_s Filename.basename source_file_s
| Enc_path_with_underscores -> | `Enc_path_with_underscores ->
Escape.escape_path source_file_s Escape.escape_path source_file_s
| Enc_crc -> | `Enc_crc ->
let base = Filename.basename source_file_s in let base = Filename.basename source_file_s in
let dir = Filename.dirname source_file_s in let dir = Filename.dirname source_file_s in
string_append_crc_cutoff ~key:dir base string_append_crc_cutoff ~key:dir base

@ -1127,15 +1127,6 @@ type visual_heap_edge = {
let mk_visual_heap_edge s t l = { src = s; trg = t; lab = l } let mk_visual_heap_edge s t l = { src = s; trg = t; lab = l }
(* a visual heap has an integer identifier, a set of nodes and a set of edges*)
type visual_heap =
| VH of int * visual_heap_node list * visual_heap_edge list
(* set of visual heaps used to represent a proposition. In general, since we have high-order *)
(* lists a proposition is not a single visual heap but a set of it. The parameter of a high-order*)
(* list is visualized with a distinct visual heap. Similarly for the parameter in new arrays*)
type visual_proposition = visual_heap list
(* used to generate unique identifier for all the nodes in the set of visual graphs used to *) (* used to generate unique identifier for all the nodes in the set of visual graphs used to *)
(* represent a proposition*) (* represent a proposition*)
let global_node_counter = ref 0 let global_node_counter = ref 0

@ -27,8 +27,8 @@ let unSome = function
| Some x -> x | Some x -> x
| _ -> assert false | _ -> assert false
type normal = Normal (** kind for normal props, i.e. normalized *) type normal (** kind for normal props, i.e. normalized *)
type exposed = Exposed (** kind for exposed props *) type exposed (** kind for exposed props *)
(** A proposition. The following invariants are mantained. [sub] is of (** A proposition. The following invariants are mantained. [sub] is of
the form id1 = e1 ... idn = en where: the id's are distinct and do not the form id1 = e1 ... idn = en where: the id's are distinct and do not

@ -302,8 +302,6 @@ type phase = FOOTPRINT | RE_EXECUTION
type dependency_map_t = int Procname.Map.t type dependency_map_t = int Procname.Map.t
type is_library = Source | Library
(** Payload: results of some analysis *) (** Payload: results of some analysis *)
type payload = type payload =
{ {

@ -25,7 +25,6 @@ module ComplexExpressions = struct
Boolean checks (e.g. null check) and assignments on expressions considered constant are Boolean checks (e.g. null check) and assignments on expressions considered constant are
retained across the control flow assuming there are no modifications in between. *) retained across the control flow assuming there are no modifications in between. *)
type expressions_constant = type expressions_constant =
| FL_NO (* none *)
| FL_PARAMETER_STATIC (* parameter.field and static fields *) | FL_PARAMETER_STATIC (* parameter.field and static fields *)
| FL_ALL_NESTED_FIELDS (* all forms of var.field1. ... .fieldn *) | FL_ALL_NESTED_FIELDS (* all forms of var.field1. ... .fieldn *)
| FUNCTIONS_IDEMPOTENT (* the above plus function calls are considered idempotent *) | FUNCTIONS_IDEMPOTENT (* the above plus function calls are considered idempotent *)

@ -174,11 +174,11 @@ let create_icfg never_null_matcher linereader program icfg cn node =
(* (*
This type definition is for a future improvement of the capture where in one pass, the frontend will This type definition is for a future improvement of the capture where in one pass, the frontend will
translate things differently whether a source file is found for a given class translate things differently whether a source file is found for a given class
*)
type capture_status = type capture_status =
| With_source of string | With_source of string
| Library of string | Library of string
| Unknown | Unknown
*)
(* returns true for the set of classes that are selected to be translated *) (* returns true for the set of classes that are selected to be translated *)
let should_capture classes package_opt source_basename node = let should_capture classes package_opt source_basename node =

Loading…
Cancel
Save