Warn of unused extension (exception) constructors

Summary: public

Reviewed By: jvillard

Differential Revision: D2938275

fb-gh-sync-id: b784531
shipit-source-id: b784531
master
Josh Berdine 9 years ago committed by facebook-github-bot-5
parent 7e7d524e29
commit bd8284443c

@ -90,6 +90,7 @@ OCAMLBUILD_OPTIONS = \
-cflags -w,@19 \ -cflags -w,@19 \
-cflags -w,@20 \ -cflags -w,@20 \
-cflags -w,@26 \ -cflags -w,@26 \
-cflags -w,@38 \
-cflags -w,@39 \ -cflags -w,@39 \
-lflags $(OCAML_INCLUDES) \ -lflags $(OCAML_INCLUDES) \
-cflags $(OCAML_INCLUDES) \ -cflags $(OCAML_INCLUDES) \

@ -13,7 +13,6 @@ open Utils
open CFrontend_utils open CFrontend_utils
module L = Logging module L = Logging
exception Typename_not_found
let add_predefined_objc_types tenv = let add_predefined_objc_types tenv =
let class_typename = CType_to_sil_type.get_builtin_objc_typename `ObjCClass in let class_typename = CType_to_sil_type.get_builtin_objc_typename `ObjCClass in

@ -73,8 +73,6 @@ let pp ext fmt typestate =
pp_map typestate.map; pp_map typestate.map;
ext.pp fmt typestate.extension ext.pp fmt typestate.extension
exception JoinFail
let type_join typ1 typ2 = let type_join typ1 typ2 =
if PatternMatch.type_is_object typ1 then typ2 else typ1 if PatternMatch.type_is_object typ1 then typ2 else typ1
let locs_join locs1 locs2 = let locs_join locs1 locs2 =
@ -117,12 +115,11 @@ let map_join m1 m2 =
(t1, ta1', locs1) in (t1, ta1', locs1) in
tjoined := M.add exp1 range1' !tjoined in tjoined := M.add exp1 range1' !tjoined in
if m1 == m2 then m1 if m1 == m2 then m1
else else (
try M.iter extend_lhs m2;
M.iter extend_lhs m2; M.iter missing_rhs m1;
M.iter missing_rhs m1; !tjoined
!tjoined )
with JoinFail -> m1
let join ext t1 t2 = let join ext t1 t2 =
{ {

Loading…
Cancel
Save