Reviewed By: ngorogiannis Differential Revision: D17499359 fbshipit-source-id: e4bd91eb1master
parent
637fff5247
commit
825c7af581
@ -0,0 +1,23 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*)
|
||||||
|
open! IStd
|
||||||
|
module F = Format
|
||||||
|
|
||||||
|
let export_changed_functions trans_unit_ctx ast_decl =
|
||||||
|
let source_file = trans_unit_ctx.CFrontend_config.source_file in
|
||||||
|
let f () =
|
||||||
|
if Config.export_changed_functions then
|
||||||
|
let clang_range_map = AstToRangeMap.process_ast ast_decl source_file in
|
||||||
|
TestDeterminator.compute_and_emit_relevant_methods ~clang_range_map ~source_file
|
||||||
|
in
|
||||||
|
let call_f () =
|
||||||
|
CFrontend_errors.protect trans_unit_ctx
|
||||||
|
~recover:(fun () -> ())
|
||||||
|
~pp_context:(fun f () -> F.fprintf f "Error when processing %a" SourceFile.pp source_file)
|
||||||
|
~f
|
||||||
|
in
|
||||||
|
call_f ()
|
@ -0,0 +1,10 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*)
|
||||||
|
open! IStd
|
||||||
|
|
||||||
|
val export_changed_functions :
|
||||||
|
CFrontend_config.translation_unit_context -> Clang_ast_t.decl -> unit
|
Loading…
Reference in new issue