[clang] Make the frontend with compilation database fail with compilation errors

Reviewed By: jvillard

Differential Revision: D7860012

fbshipit-source-id: acc9abc
master
Dulma Churchill 7 years ago committed by Facebook Github Bot
parent 01ee635902
commit 96e5a976c4

@ -359,6 +359,8 @@ module Name = struct
let is_class = function CppClass _ | JavaClass _ | ObjcClass _ -> true | _ -> false
let is_objc_protocol name = match name with ObjcProtocol _ -> true | _ -> false
let is_same_type t1 t2 =
match (t1, t2) with
| CStruct _, CStruct _
@ -878,6 +880,10 @@ module Procname = struct
t
let rec is_method_in_objc_protocol t =
match t with ObjC_Cpp osig -> Name.is_objc_protocol osig.class_name | _ -> false
let rec objc_cpp_replace_method_name t (new_method_name: string) =
match t with
| ObjC_Cpp osig ->

@ -133,6 +133,8 @@ module Name : sig
val is_class : t -> bool
(** [is_class name] holds if [name] names CPP/Objc/Java class *)
val is_objc_protocol : t -> bool
val is_same_type : t -> t -> bool
(** [is_class name1 name2] holds if [name1] and [name2] name same kind of type *)
@ -508,6 +510,8 @@ module Procname : sig
(** Replace the class name component of a procedure name.
In case of Java, replace package and class name. *)
val is_method_in_objc_protocol : t -> bool
val to_string : t -> string
(** Convert a proc name to a string for the user to see. *)

@ -1249,6 +1249,13 @@ let rec sym_exec exe_env tenv current_pdesc instr_ (prop_: Prop.normal Prop.t) p
else [(prop_r, path)]
in
let do_call (prop, path) =
( match resolved_summary_opt with
| Some resolved_summary ->
Logging.progress "%a is defined %b@." Typ.Procname.pp resolved_pname
(Specs.get_attributes resolved_summary).ProcAttributes.is_defined
| None ->
Logging.progress "%a is objc protocol %b@." Typ.Procname.pp resolved_pname
(Typ.Procname.is_method_in_objc_protocol resolved_pname) ) ;
let reason_to_skip_opt =
Option.value_map ~f:reason_to_skip ~default:(Some "function or method not found")
resolved_summary_opt

Loading…
Cancel
Save