diff --git a/facebook-clang-plugins/Makefile b/facebook-clang-plugins/Makefile index 7f393e086..b52f47169 100644 --- a/facebook-clang-plugins/Makefile +++ b/facebook-clang-plugins/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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. @@ -26,17 +26,3 @@ fmt_all: find libtooling \ \( -name '*'.cpp -or -name '*'.h -or -name '*'.c -or -name '*'.m -or -name '*'.mm \) \ -exec ./clang/install/bin/clang-format -verbose -i \{\} \+ - -CHECKCOPYRIGHT=../infer/bin/checkCopyright - -.PHONY: copyright -copyright: - @[ -x $(CHECKCOPYRIGHT) ] || { \ - echo "only works when this repo is checked out as a git submodule inside the infer repo" >&2; \ - echo "make sure this is the case and that `make checkCopyright` has been run from within infer" >&2; \ - exit 1; \ - } - git ls-files \ - | grep -e '\(\.\(atd\|c\|cpp\|h\|m\|ml\|mli\|mm\|py\|sh\)\(\|\.p\)$$\|^\(.*/\|\)Makefile\)' \ - | grep -v 'libtooling/ASTExporter\.\(cpp\|h\)' \ - | xargs $(CHECKCOPYRIGHT) -i diff --git a/facebook-clang-plugins/Makefile.common b/facebook-clang-plugins/Makefile.common index 3a588393d..43efd02f3 100644 --- a/facebook-clang-plugins/Makefile.common +++ b/facebook-clang-plugins/Makefile.common @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/Makefile.config b/facebook-clang-plugins/Makefile.config index aa0dca7f2..8e9902988 100644 --- a/facebook-clang-plugins/Makefile.config +++ b/facebook-clang-plugins/Makefile.config @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/Makefile.rules b/facebook-clang-plugins/Makefile.rules index dbc846511..d11ac55d7 100644 --- a/facebook-clang-plugins/Makefile.rules +++ b/facebook-clang-plugins/Makefile.rules @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/clang-ocaml/Makefile b/facebook-clang-plugins/clang-ocaml/Makefile index 48edff8e0..5fd9ea403 100644 --- a/facebook-clang-plugins/clang-ocaml/Makefile +++ b/facebook-clang-plugins/clang-ocaml/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_converter.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_converter.ml index 78878e0a8..d70240adc 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_converter.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_converter.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_main.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_main.ml index 4a1bcb922..eeeafa5d1 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_main.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_main.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. @@ -8,7 +8,7 @@ module PointerOrd = struct type t = int - let compare (i: int) (j: int) = i - j + let compare (i : int) (j : int) = i - j end module PointerMap = Map.Make (PointerOrd) @@ -24,8 +24,8 @@ let ivarToPropertyMap = ref PointerMap.empty let empty_v = Clang_ast_visit.empty_visitor (* This function is not thread-safe *) -let visit_ast ?(visit_decl= empty_v) ?(visit_stmt= empty_v) ?(visit_type= empty_v) - ?(visit_src_loc= empty_v) top_decl = +let visit_ast ?(visit_decl = empty_v) ?(visit_stmt = empty_v) ?(visit_type = empty_v) + ?(visit_src_loc = empty_v) top_decl = Clang_ast_visit.decl_visitor := visit_decl ; Clang_ast_visit.stmt_visitor := visit_stmt ; Clang_ast_visit.type_visitor := visit_type ; @@ -113,4 +113,5 @@ let index_node_pointers top_decl = visit_ast ~visit_decl:process_decl ~visit_stmt:add_stmt_to_cache ~visit_type:add_type_to_cache ~visit_src_loc:complete_source_location top_decl ; let result = (!declMap, !stmtMap, !typeMap, !ivarToPropertyMap) in - reset_cache () ; result + reset_cache () ; + result diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_main_test.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_main_test.ml index 6a7cd5d68..459eabb48 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_main_test.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_main_test.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. @@ -20,7 +20,9 @@ let validate_type_ptr key_ptr c_type = validate_ptr key_ptr (`TypeNode c_type) let print_node path kind_str = let indent = String.make (List.length path) ' ' in - prerr_string indent ; prerr_string kind_str ; prerr_newline () + prerr_string indent ; + prerr_string kind_str ; + prerr_newline () let sloc_to_str sloc = @@ -65,9 +67,15 @@ let check_decl_cache_from_file fname = let main = let v = Sys.argv in - try for i = 1 to Array.length v - 1 do check_decl_cache_from_file v.(i) done with + try + for i = 1 to Array.length v - 1 do + check_decl_cache_from_file v.(i) + done + with | PointerMismatch -> prerr_string "Pointer in cache doesn't match" ; exit 1 | Yojson.Json_error s | Atdgen_runtime.Oj_run.Error s -> - prerr_string s ; prerr_newline () ; exit 1 + prerr_string s ; + prerr_newline () ; + exit 1 diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_named_decl_printer.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_named_decl_printer.ml index 7589805cd..083dedc50 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_named_decl_printer.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_named_decl_printer.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -29,6 +29,8 @@ let print_named_decl_from_file fname = let main = - try Array.iteri (fun i arg -> if i <> 0 then print_named_decl_from_file arg) Sys.argv with - | Yojson.Json_error s | Atdgen_runtime.Oj_run.Error s -> - prerr_string s ; prerr_newline () ; exit 1 + try Array.iteri (fun i arg -> if i <> 0 then print_named_decl_from_file arg) Sys.argv + with Yojson.Json_error s | Atdgen_runtime.Oj_run.Error s -> + prerr_string s ; + prerr_newline () ; + exit 1 diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_proj.ml.p b/facebook-clang-plugins/clang-ocaml/clang_ast_proj.ml.p index bfc9badce..7bbff9884 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_proj.ml.p +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_proj.ml.p @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_proj.mli.p b/facebook-clang-plugins/clang-ocaml/clang_ast_proj.mli.p index 4a8717327..3bad5011c 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_proj.mli.p +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_proj.mli.p @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_proj_test.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_proj_test.ml index 5a465d4b2..308f6a37e 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_proj_test.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_proj_test.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -33,11 +33,10 @@ let name_info name = {ni_name= name; ni_qual_name= [name]} let append_name_info info suffix = {ni_name= info.ni_name ^ suffix; ni_qual_name= List.map (fun x -> x ^ suffix) info.ni_qual_name} + let qual_type ptr = - { qt_type_ptr= ptr - ; qt_is_const= false - ; qt_is_restrict= false - ; qt_is_volatile= false } + {qt_type_ptr= ptr; qt_is_const= false; qt_is_restrict= false; qt_is_volatile= false} + let var_decl_info ~is_global = { vdi_is_global= is_global @@ -49,16 +48,16 @@ let var_decl_info ~is_global = ; vdi_is_init_expr_cxx11_constant= false ; vdi_init_expr= None ; vdi_parm_index_in_function= None - ; vdi_is_static = false} + ; vdi_is_static= false } + let stmt_info pointer = - { si_pointer= pointer - ; si_source_range= (empty_source_location, empty_source_location) } + {si_pointer= pointer; si_source_range= (empty_source_location, empty_source_location)} + let expr_info qual_type = - { ei_qual_type= qual_type - ; ei_value_kind= `RValue - ; ei_object_kind= `Ordinary } + {ei_qual_type= qual_type; ei_value_kind= `RValue; ei_object_kind= `Ordinary} + let cxx_construct_expr_info decl_ref is_copy_constructor = { xcei_decl_ref= decl_ref @@ -84,39 +83,41 @@ let () = let di2 = decl_info (source_location ~file:"bla" ()) (source_location ~file:"bleh" ()) in let decl3 = update_decl_tuple (fun _ -> di2) decl in assert_equal "update_decl_tuple" (get_decl_tuple decl3) di2 ; - assert_equal "get_var_decl_tuple_none" (get_var_decl_tuple decl) None ; let vdi = var_decl_info ~is_global:true in let qt = qual_type (Clang_ast_types.TypePtr.wrap 0) in - let var_decl = ParmVarDecl(di, name_info "fooey", qt, vdi) in + let var_decl = ParmVarDecl (di, name_info "fooey", qt, vdi) in assert_equal "get_var_decl_tuple" (get_var_decl_tuple var_decl) (Some (di, name_info "fooey", qt, vdi)) ; - let updated_var_decl = update_var_decl_tuple - (fun (di, ni, qt, vdi) -> - (di, append_name_info ni "-mod", qt, var_decl_info ~is_global:false)) - var_decl in - assert_equal "update_var_decl_tuple" (get_var_decl_tuple updated_var_decl) + let updated_var_decl = + update_var_decl_tuple + (fun (di, ni, qt, vdi) -> (di, append_name_info ni "-mod", qt, var_decl_info ~is_global:false)) + var_decl + in + assert_equal "update_var_decl_tuple" + (get_var_decl_tuple updated_var_decl) (Some (di, name_info "fooey-mod", qt, var_decl_info ~is_global:false)) ; - - let stmt = DoStmt(stmt_info 0, []) in - assert_equal "get_cxx_construct_expr_tuple_from_stmt" - (get_cxx_construct_expr_tuple stmt) None ; + let stmt = DoStmt (stmt_info 0, []) in + assert_equal "get_cxx_construct_expr_tuple_from_stmt" (get_cxx_construct_expr_tuple stmt) None ; let ei = expr_info qt in - let dr = { dr_kind= `CXXConstructor - ; dr_decl_pointer= 0 - ; dr_name= None - ; dr_is_hidden= false - ; dr_qual_type= None } in + let dr = + { dr_kind= `CXXConstructor + ; dr_decl_pointer= 0 + ; dr_name= None + ; dr_is_hidden= false + ; dr_qual_type= None } + in let xcei = cxx_construct_expr_info dr true in let xcei2 = cxx_construct_expr_info dr false in - let cxx_ctor_expr = CXXConstructExpr(stmt_info 1, [], ei, xcei) in + let cxx_ctor_expr = CXXConstructExpr (stmt_info 1, [], ei, xcei) in assert_equal "get_cxx_construct_expr_tuple" (get_cxx_construct_expr_tuple cxx_ctor_expr) (Some (stmt_info 1, [], ei, xcei)) ; - let updated_cxx_ctor_expr = update_cxx_construct_expr_tuple - (fun (si, sl, ei, xcei) -> - (stmt_info (si.si_pointer + 1)), sl, ei, xcei2) - cxx_ctor_expr in + let updated_cxx_ctor_expr = + update_cxx_construct_expr_tuple + (fun (si, sl, ei, xcei) -> (stmt_info (si.si_pointer + 1), sl, ei, xcei2)) + cxx_ctor_expr + in assert_equal "update_cxx_construct_expr_tuple" (get_cxx_construct_expr_tuple updated_cxx_ctor_expr) - (Some (stmt_info 2, [], ei, xcei2)) ; + (Some (stmt_info 2, [], ei, xcei2)) diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_types.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_types.ml index a333b8cdd..44239e38f 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_types.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_types.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_visit.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_visit.ml index 7ae60cfaa..6bec8d89a 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_visit.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_visit.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/clang_ast_yojson_validator.ml b/facebook-clang-plugins/clang-ocaml/clang_ast_yojson_validator.ml index 7ab216aa5..2ec1ee136 100644 --- a/facebook-clang-plugins/clang-ocaml/clang_ast_yojson_validator.ml +++ b/facebook-clang-plugins/clang-ocaml/clang_ast_yojson_validator.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/process.ml b/facebook-clang-plugins/clang-ocaml/process.ml index 30773d8bd..2ff371c85 100644 --- a/facebook-clang-plugins/clang-ocaml/process.ml +++ b/facebook-clang-plugins/clang-ocaml/process.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -50,20 +50,42 @@ let gzip ic oc = let ocz = Gzip.open_out_chan oc in let buffer = Bytes.create buffer_size in let rec loop () = - match input ic buffer 0 buffer_size with 0 -> () | r -> Gzip.output ocz buffer 0 r ; loop () + match input ic buffer 0 buffer_size with + | 0 -> + () + | r -> + Gzip.output ocz buffer 0 r ; + loop () + in + let success = + try + loop () ; + true + with Gzip.Error _ -> false in - let success = try loop () ; true with Gzip.Error _ -> false in - Gzip.close_out ocz ; success + Gzip.close_out ocz ; + success let gunzip ic oc = let icz = Gzip.open_in_chan ic in let buffer = Bytes.create buffer_size in let rec loop () = - match Gzip.input icz buffer 0 buffer_size with 0 -> () | r -> output oc buffer 0 r ; loop () + match Gzip.input icz buffer 0 buffer_size with + | 0 -> + () + | r -> + output oc buffer 0 r ; + loop () + in + let success = + try + loop () ; + true + with Gzip.Error _ -> false in - let success = try loop () ; true with Gzip.Error _ -> false in - Gzip.close_in icz ; success + Gzip.close_in icz ; + success let copy ic oc = tee ic [oc] @@ -91,21 +113,29 @@ let diff file1 file2 oc = exec [|"diff"; file1; file2|] stdin oc stderr let fork f = let fd_in, fd_out = U.pipe () in match U.fork () with - | 0 - -> ( + | 0 -> ( U.close fd_in ; - try if f (U.out_channel_of_descr fd_out) then exit 0 else ( close fd_out ; exit 1 ) - with _ -> close fd_out ; exit 2 ) + try + if f (U.out_channel_of_descr fd_out) then exit 0 + else ( + close fd_out ; + exit 1 ) + with _ -> + close fd_out ; + exit 2 ) | pid -> if pid < 0 then failwith "fork error" - else ( U.close fd_out ; (pid, U.in_channel_of_descr fd_in) ) + else ( + U.close fd_out ; + (pid, U.in_channel_of_descr fd_in) ) let compose f g ic oc = let pid, ic1 = fork (f ic) in let r1 = g ic1 oc in let r2 = wait pid in - close_in ic1 ; r1 && r2 + close_in ic1 ; + r1 && r2 let diff_on_same_input f1 f2 ic oc = @@ -122,4 +152,7 @@ let diff_on_same_input f1 f2 ic oc = close_out ofile1 ; close_out ofile2 ; let success = if r1 && r2 then diff file1 file2 oc else false in - U.unlink file ; U.unlink file1 ; U.unlink file2 ; success + U.unlink file ; + U.unlink file1 ; + U.unlink file2 ; + success diff --git a/facebook-clang-plugins/clang-ocaml/process.mli b/facebook-clang-plugins/clang-ocaml/process.mli index cc981839a..c3b3924b8 100644 --- a/facebook-clang-plugins/clang-ocaml/process.mli +++ b/facebook-clang-plugins/clang-ocaml/process.mli @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -30,9 +30,15 @@ val gunzip : in_channel -> out_channel -> bool val fork : (out_channel -> bool) -> int * in_channel val compose : - (in_channel -> out_channel -> bool) -> (in_channel -> out_channel -> bool) -> in_channel - -> out_channel -> bool + (in_channel -> out_channel -> bool) + -> (in_channel -> out_channel -> bool) + -> in_channel + -> out_channel + -> bool val diff_on_same_input : - (in_channel -> out_channel -> bool) -> (in_channel -> out_channel -> bool) -> in_channel - -> out_channel -> bool + (in_channel -> out_channel -> bool) + -> (in_channel -> out_channel -> bool) + -> in_channel + -> out_channel + -> bool diff --git a/facebook-clang-plugins/clang-ocaml/process_test.ml b/facebook-clang-plugins/clang-ocaml/process_test.ml index bc5dd0a1c..f15baccd3 100644 --- a/facebook-clang-plugins/clang-ocaml/process_test.ml +++ b/facebook-clang-plugins/clang-ocaml/process_test.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -14,6 +14,12 @@ let main = true ) in let zipunzip = compose gzip gunzip in - ignore (diff_on_same_input (fun ic oc -> copy ic oc ; flush_all () ; true) zipunzip ic stderr) ; + ignore + (diff_on_same_input + (fun ic oc -> + copy ic oc ; + flush_all () ; + true ) + zipunzip ic stderr) ; close_in ic ; ignore (wait pid) diff --git a/facebook-clang-plugins/clang-ocaml/tests/clang_ast_main_test.exp b/facebook-clang-plugins/clang-ocaml/tests/clang_ast_main_test.exp index fc07dbca7..49821f536 100644 --- a/facebook-clang-plugins/clang-ocaml/tests/clang_ast_main_test.exp +++ b/facebook-clang-plugins/clang-ocaml/tests/clang_ast_main_test.exp @@ -1712,15 +1712,15 @@ TranslationUnitDecl None:None:None None:None:None ParmVarDecl tests/FoundationStub.h:52:13 tests/FoundationStub.h:52:13 FunctionDecl tests/FoundationStub.h:52:1 tests/FoundationStub.h:52:34 ParmVarDecl tests/FoundationStub.h:52:19 tests/FoundationStub.h:52:28 - RecordDecl tests/ObjCBridgeTransferTest.m:3:9 tests/ObjCBridgeTransferTest.m:4:1 - TypedefDecl tests/ObjCBridgeTransferTest.m:3:1 tests/ObjCBridgeTransferTest.m:4:3 - ObjCInterfaceDecl tests/ObjCBridgeTransferTest.m:6:1 tests/ObjCBridgeTransferTest.m:7:2 - FunctionDecl tests/ObjCBridgeTransferTest.m:9:1 tests/ObjCBridgeTransferTest.m:9:27 - ObjCInterfaceDecl tests/ObjCBridgeTransferTest.m:11:1 tests/ObjCBridgeTransferTest.m:12:2 - ObjCImplementationDecl tests/ObjCBridgeTransferTest.m:14:1 tests/ObjCBridgeTransferTest.m:20:1 - ObjCMethodDecl tests/ObjCBridgeTransferTest.m:16:1 tests/ObjCBridgeTransferTest.m:18:1 - ImplicitParamDecl tests/ObjCBridgeTransferTest.m:18:1 tests/ObjCBridgeTransferTest.m:18:1 - ImplicitParamDecl tests/ObjCBridgeTransferTest.m:18:1 tests/ObjCBridgeTransferTest.m:18:1 + RecordDecl tests/ObjCBridgeTransferTest.m:10:9 tests/ObjCBridgeTransferTest.m:11:1 + TypedefDecl tests/ObjCBridgeTransferTest.m:10:1 tests/ObjCBridgeTransferTest.m:11:3 + ObjCInterfaceDecl tests/ObjCBridgeTransferTest.m:13:1 tests/ObjCBridgeTransferTest.m:14:2 + FunctionDecl tests/ObjCBridgeTransferTest.m:16:1 tests/ObjCBridgeTransferTest.m:16:27 + ObjCInterfaceDecl tests/ObjCBridgeTransferTest.m:18:1 tests/ObjCBridgeTransferTest.m:19:2 + ObjCImplementationDecl tests/ObjCBridgeTransferTest.m:21:1 tests/ObjCBridgeTransferTest.m:27:1 + ObjCMethodDecl tests/ObjCBridgeTransferTest.m:23:1 tests/ObjCBridgeTransferTest.m:25:1 + ImplicitParamDecl tests/ObjCBridgeTransferTest.m:25:1 tests/ObjCBridgeTransferTest.m:25:1 + ImplicitParamDecl tests/ObjCBridgeTransferTest.m:25:1 tests/ObjCBridgeTransferTest.m:25:1 CompoundStmt DeclStmt ExprWithCleanups @@ -1729,14 +1729,14 @@ TranslationUnitDecl None:None:None None:None:None CallExpr ImplicitCastExpr DeclRefExpr - VarDecl tests/ObjCBridgeTransferTest.m:17:3 tests/ObjCBridgeTransferTest.m:17:65 + VarDecl tests/ObjCBridgeTransferTest.m:24:3 tests/ObjCBridgeTransferTest.m:24:65 ExprWithCleanups ImplicitCastExpr ObjCBridgedCastExpr CallExpr ImplicitCastExpr DeclRefExpr - TypedefDecl tests/ObjCBridgeTransferTest.m:17:51 tests/ObjCBridgeTransferTest.m:17:51 + TypedefDecl tests/ObjCBridgeTransferTest.m:24:51 tests/ObjCBridgeTransferTest.m:24:51 12 0 84 TranslationUnitDecl None:None:None None:None:None TypedefDecl None:None:None None:None:None diff --git a/facebook-clang-plugins/clang-ocaml/utils.ml b/facebook-clang-plugins/clang-ocaml/utils.ml index ad27c8a46..aadebcf9e 100644 --- a/facebook-clang-plugins/clang-ocaml/utils.ml +++ b/facebook-clang-plugins/clang-ocaml/utils.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -17,10 +17,12 @@ let open_out name = if name = "-" then stdout else Pervasives.open_out name let make_cached f = let h = H.create 10 in function - | x -> - try H.find h x with Not_found -> - let y = f x in - H.add h x y ; y + | x -> ( + try H.find h x + with Not_found -> + let y = f x in + H.add h x y ; + y ) (* missing string API *) @@ -87,7 +89,8 @@ let stream_concat streams = current_stream := Some stream ; stream in - try Some (Stream.next stream) with Stream.Failure -> + try Some (Stream.next stream) + with Stream.Failure -> current_stream := None ; next i with Stream.Failure -> None @@ -149,9 +152,11 @@ module DisjointSet = struct let create () = Hashtbl.create 10 let bucket t x = - try Hashtbl.find t x with Not_found -> + try Hashtbl.find t x + with Not_found -> let b = {parent= x; rank= 0} in - Hashtbl.add t x b ; b + Hashtbl.add t x b ; + b let rec find_bucket t x = diff --git a/facebook-clang-plugins/clang-ocaml/utils.mli b/facebook-clang-plugins/clang-ocaml/utils.mli index aa8503f64..15366adf0 100644 --- a/facebook-clang-plugins/clang-ocaml/utils.mli +++ b/facebook-clang-plugins/clang-ocaml/utils.mli @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/utils_test.ml b/facebook-clang-plugins/clang-ocaml/utils_test.ml index 4cb77ca73..d56fd794f 100644 --- a/facebook-clang-plugins/clang-ocaml/utils_test.ml +++ b/facebook-clang-plugins/clang-ocaml/utils_test.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -39,7 +39,11 @@ let () = let () = - let pid, ic = Process.fork (fun oc -> output_string oc "foo\nbar\n" ; true) in + let pid, ic = + Process.fork (fun oc -> + output_string oc "foo\nbar\n" ; + true ) + in let lines = stream_to_list (line_stream_of_channel ic) in assert_true "line_stream_of_channel::wait" (Process.wait pid) ; assert_equal "line_stream_of_channel::result" lines ["foo"; "bar"] diff --git a/facebook-clang-plugins/clang-ocaml/yojson_utils.ml b/facebook-clang-plugins/clang-ocaml/yojson_utils.ml index 712028646..648347f79 100644 --- a/facebook-clang-plugins/clang-ocaml/yojson_utils.ml +++ b/facebook-clang-plugins/clang-ocaml/yojson_utils.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -11,10 +11,8 @@ module P = Process (* Needed as a (pointer-stable) default value for atd specs. *) let empty_string = "" -let ydump ?(compact_json= false) ?(std_json= false) ic oc = - let cmd = - ["ydump"] @ (if compact_json then ["-c"] else []) @ if std_json then ["-std"] else [] - in +let ydump ?(compact_json = false) ?(std_json = false) ic oc = + let cmd = ["ydump"] @ (if compact_json then ["-c"] else []) @ if std_json then ["-std"] else [] in P.exec (Array.of_list cmd) ic oc stderr @@ -35,18 +33,28 @@ let read_data_from_file reader fname = else if U.string_ends_with fname ".value" then Marshal.from_channel ic else Atdgen_runtime.Util.Json.from_channel ~fname reader ic in - close_in ic ; data + close_in ic ; + data -let write_data_to_file ?(pretty= false) ?(compact_json= false) ?(std_json= false) writer fname data = +let write_data_to_file ?(pretty = false) ?(compact_json = false) ?(std_json = false) writer fname + data = let output_gzipped write_data oc data = - let pid, icz = P.fork (fun ocz -> write_data ocz data ; true) in + let pid, icz = + P.fork (fun ocz -> + write_data ocz data ; + true ) + in let r1 = P.gzip icz oc and r2 = P.wait pid in P.close_in icz ; if not (r1 && r2) then failwith "write_data_to_file (gzip)" else () and output_pretty write_data oc data = (* TODO(mathieubaudet): find out how to write directly pretty json? *) - let pid, icp = P.fork (fun ocp -> write_data ocp data ; true) in + let pid, icp = + P.fork (fun ocp -> + write_data ocp data ; + true ) + in let r1 = ydump ~compact_json ~std_json icp oc and r2 = P.wait pid in P.close_in icp ; if not (r1 && r2) then failwith "write_data_to_file (pretty)" else () @@ -64,20 +72,17 @@ let write_data_to_file ?(pretty= false) ?(compact_json= false) ?(std_json= false close_out oc -let convert ?(pretty= false) ?(compact_json= false) ?(std_json= false) reader writer fin fout = +let convert ?(pretty = false) ?(compact_json = false) ?(std_json = false) reader writer fin fout = try - read_data_from_file reader fin - |> write_data_to_file writer ~pretty ~compact_json ~std_json fout - with - | Yojson.Json_error s | Atdgen_runtime.Oj_run.Error s -> - prerr_string s ; prerr_newline () ; exit 1 + read_data_from_file reader fin |> write_data_to_file writer ~pretty ~compact_json ~std_json fout + with Yojson.Json_error s | Atdgen_runtime.Oj_run.Error s -> + prerr_string s ; + prerr_newline () ; + exit 1 let run_converter_tool reader writer = - let pretty = ref false - and std_json = ref false - and compact_json = ref false - and files = ref [] in + let pretty = ref false and std_json = ref false and compact_json = ref false and files = ref [] in let add_files x = files := x :: !files and usage_msg = "Usage: " ^ Sys.argv.(0) ^ "[OPTIONS] INPUT_FILE [OUTPUT_FILE]\n" @@ -89,7 +94,8 @@ let run_converter_tool reader writer = [ ("--pretty", Arg.Set pretty, " Pretty print outputs.") ; ("--std", Arg.Set std_json, " Use standard json for outputs.") ; ("--compact", Arg.Set compact_json, " Use compact json for outputs.") - ; ("--", Arg.Rest add_files, " Mark the end of options.") ] usage_msg + ; ("--", Arg.Rest add_files, " Mark the end of options.") ] + usage_msg in (* Parse the command line. *) Arg.parse spec add_files usage_msg ; @@ -100,7 +106,7 @@ let run_converter_tool reader writer = | [input; output] -> (input, output) | _ -> - prerr_string usage_msg ; exit 1 + prerr_string usage_msg ; + exit 1 in - convert ~pretty:!pretty ~std_json:!std_json ~compact_json:!compact_json reader writer input - output + convert ~pretty:!pretty ~std_json:!std_json ~compact_json:!compact_json reader writer input output diff --git a/facebook-clang-plugins/clang-ocaml/yojson_utils.mli b/facebook-clang-plugins/clang-ocaml/yojson_utils.mli index 62a1e50f6..e7f20862f 100644 --- a/facebook-clang-plugins/clang-ocaml/yojson_utils.mli +++ b/facebook-clang-plugins/clang-ocaml/yojson_utils.mli @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -8,8 +8,13 @@ val read_data_from_file : 'a Atdgen_runtime.Util.Json.reader -> string -> 'a val write_data_to_file : - ?pretty:bool -> ?compact_json:bool -> ?std_json:bool -> 'a Atdgen_runtime.Util.Json.writer - -> string -> 'a -> unit + ?pretty:bool + -> ?compact_json:bool + -> ?std_json:bool + -> 'a Atdgen_runtime.Util.Json.writer + -> string + -> 'a + -> unit val ydump : ?compact_json:bool -> ?std_json:bool -> in_channel -> out_channel -> bool diff --git a/facebook-clang-plugins/clang-ocaml/yojson_utils_test.ml b/facebook-clang-plugins/clang-ocaml/yojson_utils_test.ml index 2e4e3d0ae..79c13092e 100644 --- a/facebook-clang-plugins/clang-ocaml/yojson_utils_test.ml +++ b/facebook-clang-plugins/clang-ocaml/yojson_utils_test.ml @@ -1,5 +1,5 @@ (* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/clang-ocaml/yojson_validator.sh b/facebook-clang-plugins/clang-ocaml/yojson_validator.sh index 5f427d2d7..66d2654a0 100755 --- a/facebook-clang-plugins/clang-ocaml/yojson_validator.sh +++ b/facebook-clang-plugins/clang-ocaml/yojson_validator.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/clang/setup.sh b/facebook-clang-plugins/clang/setup.sh index 85a6d9662..901e33497 100755 --- a/facebook-clang-plugins/clang/setup.sh +++ b/facebook-clang-plugins/clang/setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2014-present, Facebook, Inc. +# 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. @@ -174,9 +174,9 @@ if [ "$SEQUENTIAL_LINK" = "yes" ]; then fi # For Ninja, the compile jobs is the number of CPUs *not* $JOBS CMAKE_ARGS+=( - -DCMAKE_JOB_POOLS:STRING="compile=$NCPUS;link=1" - -DCMAKE_JOB_POOL_COMPILE:STRING="compile" - -DCMAKE_JOB_POOL_LINK:STRING="link" + -DCMAKE_JOB_POOLS:STRING="compile=$NCPUS;link=1" + -DCMAKE_JOB_POOL_COMPILE:STRING="compile" + -DCMAKE_JOB_POOL_LINK:STRING="link" ) fi diff --git a/facebook-clang-plugins/libtooling/AttrParameterVectorStream.cpp b/facebook-clang-plugins/libtooling/AttrParameterVectorStream.cpp index a88480109..8212283ea 100644 --- a/facebook-clang-plugins/libtooling/AttrParameterVectorStream.cpp +++ b/facebook-clang-plugins/libtooling/AttrParameterVectorStream.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/AttrParameterVectorStream.h b/facebook-clang-plugins/libtooling/AttrParameterVectorStream.h index 5359f4536..f615a4e1f 100644 --- a/facebook-clang-plugins/libtooling/AttrParameterVectorStream.h +++ b/facebook-clang-plugins/libtooling/AttrParameterVectorStream.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/FileUtils.cpp b/facebook-clang-plugins/libtooling/FileUtils.cpp index ed0c51d2e..14581f19c 100644 --- a/facebook-clang-plugins/libtooling/FileUtils.cpp +++ b/facebook-clang-plugins/libtooling/FileUtils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/FileUtils.h b/facebook-clang-plugins/libtooling/FileUtils.h index 02cc1b5d1..b67fd58cd 100644 --- a/facebook-clang-plugins/libtooling/FileUtils.h +++ b/facebook-clang-plugins/libtooling/FileUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/Makefile b/facebook-clang-plugins/libtooling/Makefile index 845813b85..77b7617de 100644 --- a/facebook-clang-plugins/libtooling/Makefile +++ b/facebook-clang-plugins/libtooling/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/libtooling/NamePrinter.h b/facebook-clang-plugins/libtooling/NamePrinter.h index 8144a05a6..d0d291c9f 100644 --- a/facebook-clang-plugins/libtooling/NamePrinter.h +++ b/facebook-clang-plugins/libtooling/NamePrinter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/SimplePluginASTAction.cpp b/facebook-clang-plugins/libtooling/SimplePluginASTAction.cpp index 9bbf48ec0..6770f50d4 100644 --- a/facebook-clang-plugins/libtooling/SimplePluginASTAction.cpp +++ b/facebook-clang-plugins/libtooling/SimplePluginASTAction.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/SimplePluginASTAction.h b/facebook-clang-plugins/libtooling/SimplePluginASTAction.h index 57d1dc7b4..60c93448b 100644 --- a/facebook-clang-plugins/libtooling/SimplePluginASTAction.h +++ b/facebook-clang-plugins/libtooling/SimplePluginASTAction.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. @@ -160,8 +160,8 @@ class SimplePluginASTActionBase : public clang::PluginASTAction { case clang::InputKind::Unknown: case clang::InputKind::Asm: case clang::InputKind::LLVM_IR: - // We can't do anything with these - they may trigger errors when running - // clang frontend + // We can't do anything with these - they may trigger errors when + // running clang frontend return false; default: // run the consumer for IK_AST and all others diff --git a/facebook-clang-plugins/libtooling/ast_exporter_bin.cpp b/facebook-clang-plugins/libtooling/ast_exporter_bin.cpp index 2a6676b8b..c4dfc141d 100644 --- a/facebook-clang-plugins/libtooling/ast_exporter_bin.cpp +++ b/facebook-clang-plugins/libtooling/ast_exporter_bin.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/ATDWriter.h b/facebook-clang-plugins/libtooling/atdlib/ATDWriter.h index d5f59ac37..bf818bdd9 100644 --- a/facebook-clang-plugins/libtooling/atdlib/ATDWriter.h +++ b/facebook-clang-plugins/libtooling/atdlib/ATDWriter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/Makefile b/facebook-clang-plugins/libtooling/atdlib/Makefile index 6d9357bbf..1442ad888 100644 --- a/facebook-clang-plugins/libtooling/atdlib/Makefile +++ b/facebook-clang-plugins/libtooling/atdlib/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/extract_atd_from_cpp.py b/facebook-clang-plugins/libtooling/atdlib/extract_atd_from_cpp.py index cfe82b1cf..d255e1288 100755 --- a/facebook-clang-plugins/libtooling/atdlib/extract_atd_from_cpp.py +++ b/facebook-clang-plugins/libtooling/atdlib/extract_atd_from_cpp.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 -# Copyright (c) 2014-present, Facebook, Inc. + +# 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/normalize_names_in_atd.py b/facebook-clang-plugins/libtooling/atdlib/normalize_names_in_atd.py index be9179b26..55f839277 100755 --- a/facebook-clang-plugins/libtooling/atdlib/normalize_names_in_atd.py +++ b/facebook-clang-plugins/libtooling/atdlib/normalize_names_in_atd.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 -# Copyright (c) 2014-present, Facebook, Inc. + +# 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.cpp b/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.cpp index d9e04dc72..ebd8e9f8e 100644 --- a/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.cpp +++ b/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.sh b/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.sh index fc05038b9..3b351eb6f 100755 --- a/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.sh +++ b/facebook-clang-plugins/libtooling/atdlib/tests/binioutest.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2015-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/tests/extract_test.cpp b/facebook-clang-plugins/libtooling/atdlib/tests/extract_test.cpp index 339666dde..2758e9894 100644 --- a/facebook-clang-plugins/libtooling/atdlib/tests/extract_test.cpp +++ b/facebook-clang-plugins/libtooling/atdlib/tests/extract_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/tests/jsontest.cpp b/facebook-clang-plugins/libtooling/atdlib/tests/jsontest.cpp index 1435c3f8a..2054b7e47 100644 --- a/facebook-clang-plugins/libtooling/atdlib/tests/jsontest.cpp +++ b/facebook-clang-plugins/libtooling/atdlib/tests/jsontest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/atdlib/tests/normalize_test.atd b/facebook-clang-plugins/libtooling/atdlib/tests/normalize_test.atd index 14a2fc097..c01a22bf9 100644 --- a/facebook-clang-plugins/libtooling/atdlib/tests/normalize_test.atd +++ b/facebook-clang-plugins/libtooling/atdlib/tests/normalize_test.atd @@ -1,3 +1,9 @@ +(* + * 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. + *) type @ObjCExpression@ = {} type x@@yz = { diff --git a/facebook-clang-plugins/libtooling/tests/BiniouASTExporter/filter.sh b/facebook-clang-plugins/libtooling/tests/BiniouASTExporter/filter.sh index 25fef3611..9c6398be3 100755 --- a/facebook-clang-plugins/libtooling/tests/BiniouASTExporter/filter.sh +++ b/facebook-clang-plugins/libtooling/tests/BiniouASTExporter/filter.sh @@ -1,5 +1,5 @@ #/bin/bash -# Copyright (c) 2015-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/libtooling/tests/FoundationStub.h b/facebook-clang-plugins/libtooling/tests/FoundationStub.h index a074fa7eb..359a27e7d 100644 --- a/facebook-clang-plugins/libtooling/tests/FoundationStub.h +++ b/facebook-clang-plugins/libtooling/tests/FoundationStub.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/Hello.m b/facebook-clang-plugins/libtooling/tests/Hello.m index f5893701a..dc2540dae 100644 --- a/facebook-clang-plugins/libtooling/tests/Hello.m +++ b/facebook-clang-plugins/libtooling/tests/Hello.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/JsonASTExporter/filter.sh b/facebook-clang-plugins/libtooling/tests/JsonASTExporter/filter.sh index ff6b1f183..50058bdf9 100755 --- a/facebook-clang-plugins/libtooling/tests/JsonASTExporter/filter.sh +++ b/facebook-clang-plugins/libtooling/tests/JsonASTExporter/filter.sh @@ -1,5 +1,5 @@ #/bin/bash -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/libtooling/tests/ObjCTest.m b/facebook-clang-plugins/libtooling/tests/ObjCTest.m index c8cbf741a..b4ef1bd31 100644 --- a/facebook-clang-plugins/libtooling/tests/ObjCTest.m +++ b/facebook-clang-plugins/libtooling/tests/ObjCTest.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/YojsonASTExporter/filter.sh b/facebook-clang-plugins/libtooling/tests/YojsonASTExporter/filter.sh index ff6b1f183..50058bdf9 100755 --- a/facebook-clang-plugins/libtooling/tests/YojsonASTExporter/filter.sh +++ b/facebook-clang-plugins/libtooling/tests/YojsonASTExporter/filter.sh @@ -1,5 +1,5 @@ #/bin/bash -# Copyright (c) 2014-present, Facebook, Inc. +# 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. diff --git a/facebook-clang-plugins/libtooling/tests/available_expression.m b/facebook-clang-plugins/libtooling/tests/available_expression.m index f9937f210..1ddf995ba 100644 --- a/facebook-clang-plugins/libtooling/tests/available_expression.m +++ b/facebook-clang-plugins/libtooling/tests/available_expression.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/bind_temporary.cpp b/facebook-clang-plugins/libtooling/tests/bind_temporary.cpp index 143cd1a66..39d1b8e45 100644 --- a/facebook-clang-plugins/libtooling/tests/bind_temporary.cpp +++ b/facebook-clang-plugins/libtooling/tests/bind_temporary.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/c_attributes.c b/facebook-clang-plugins/libtooling/tests/c_attributes.c index 932d9c518..fd1b07bab 100644 --- a/facebook-clang-plugins/libtooling/tests/c_attributes.c +++ b/facebook-clang-plugins/libtooling/tests/c_attributes.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/c_cast.cpp b/facebook-clang-plugins/libtooling/tests/c_cast.cpp index bfb882358..17aa8e8dd 100644 --- a/facebook-clang-plugins/libtooling/tests/c_cast.cpp +++ b/facebook-clang-plugins/libtooling/tests/c_cast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/class_template.cpp b/facebook-clang-plugins/libtooling/tests/class_template.cpp index 25fa40bc0..cc3e13503 100644 --- a/facebook-clang-plugins/libtooling/tests/class_template.cpp +++ b/facebook-clang-plugins/libtooling/tests/class_template.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/comments.c b/facebook-clang-plugins/libtooling/tests/comments.c index 4bccb1e41..a11e077ea 100644 --- a/facebook-clang-plugins/libtooling/tests/comments.c +++ b/facebook-clang-plugins/libtooling/tests/comments.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/const_cast.cpp b/facebook-clang-plugins/libtooling/tests/const_cast.cpp index b53ea978a..cf275dd2e 100644 --- a/facebook-clang-plugins/libtooling/tests/const_cast.cpp +++ b/facebook-clang-plugins/libtooling/tests/const_cast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/copy_constructor.cpp b/facebook-clang-plugins/libtooling/tests/copy_constructor.cpp index d20ed030c..456d51498 100644 --- a/facebook-clang-plugins/libtooling/tests/copy_constructor.cpp +++ b/facebook-clang-plugins/libtooling/tests/copy_constructor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/dynamic_cast.cpp b/facebook-clang-plugins/libtooling/tests/dynamic_cast.cpp index 0a9e41cfb..13e560ef0 100644 --- a/facebook-clang-plugins/libtooling/tests/dynamic_cast.cpp +++ b/facebook-clang-plugins/libtooling/tests/dynamic_cast.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/expr_with_cleanups.cpp b/facebook-clang-plugins/libtooling/tests/expr_with_cleanups.cpp index 3a2b1f2d5..60bd3cc14 100644 --- a/facebook-clang-plugins/libtooling/tests/expr_with_cleanups.cpp +++ b/facebook-clang-plugins/libtooling/tests/expr_with_cleanups.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/friend.cpp b/facebook-clang-plugins/libtooling/tests/friend.cpp index 457bc85d7..77f12da51 100644 --- a/facebook-clang-plugins/libtooling/tests/friend.cpp +++ b/facebook-clang-plugins/libtooling/tests/friend.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/function_template.cpp b/facebook-clang-plugins/libtooling/tests/function_template.cpp index 2f17d056e..f3753e498 100644 --- a/facebook-clang-plugins/libtooling/tests/function_template.cpp +++ b/facebook-clang-plugins/libtooling/tests/function_template.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/generic_selector_expression.c b/facebook-clang-plugins/libtooling/tests/generic_selector_expression.c index a4380275c..b918cf6ad 100644 --- a/facebook-clang-plugins/libtooling/tests/generic_selector_expression.c +++ b/facebook-clang-plugins/libtooling/tests/generic_selector_expression.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/inheritance.cpp b/facebook-clang-plugins/libtooling/tests/inheritance.cpp index b3e45fbe5..ec5fa6e6f 100644 --- a/facebook-clang-plugins/libtooling/tests/inheritance.cpp +++ b/facebook-clang-plugins/libtooling/tests/inheritance.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/inheriting_constructor.cpp b/facebook-clang-plugins/libtooling/tests/inheriting_constructor.cpp index 024189f39..c412f57dd 100644 --- a/facebook-clang-plugins/libtooling/tests/inheriting_constructor.cpp +++ b/facebook-clang-plugins/libtooling/tests/inheriting_constructor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/lambda.cpp b/facebook-clang-plugins/libtooling/tests/lambda.cpp index 54d402265..c718db64a 100644 --- a/facebook-clang-plugins/libtooling/tests/lambda.cpp +++ b/facebook-clang-plugins/libtooling/tests/lambda.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/materialize_temporary.cpp b/facebook-clang-plugins/libtooling/tests/materialize_temporary.cpp index 65eb23ab1..a1376928d 100644 --- a/facebook-clang-plugins/libtooling/tests/materialize_temporary.cpp +++ b/facebook-clang-plugins/libtooling/tests/materialize_temporary.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/namespace_decl.cpp b/facebook-clang-plugins/libtooling/tests/namespace_decl.cpp index c492c6158..4b75078d9 100644 --- a/facebook-clang-plugins/libtooling/tests/namespace_decl.cpp +++ b/facebook-clang-plugins/libtooling/tests/namespace_decl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/new.cpp b/facebook-clang-plugins/libtooling/tests/new.cpp index b854934d8..3a0b7fdac 100644 --- a/facebook-clang-plugins/libtooling/tests/new.cpp +++ b/facebook-clang-plugins/libtooling/tests/new.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/no_except_expr.cpp b/facebook-clang-plugins/libtooling/tests/no_except_expr.cpp index fec61070d..5721d6bc9 100644 --- a/facebook-clang-plugins/libtooling/tests/no_except_expr.cpp +++ b/facebook-clang-plugins/libtooling/tests/no_except_expr.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/objcpp_template_unboxing.mm b/facebook-clang-plugins/libtooling/tests/objcpp_template_unboxing.mm index 999126ace..26dac3bb0 100644 --- a/facebook-clang-plugins/libtooling/tests/objcpp_template_unboxing.mm +++ b/facebook-clang-plugins/libtooling/tests/objcpp_template_unboxing.mm @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/optional.m b/facebook-clang-plugins/libtooling/tests/optional.m index 63fef1968..fa08b86f1 100644 --- a/facebook-clang-plugins/libtooling/tests/optional.m +++ b/facebook-clang-plugins/libtooling/tests/optional.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/sizeof_static_evaluation.cpp b/facebook-clang-plugins/libtooling/tests/sizeof_static_evaluation.cpp index 4c017c0cc..67175e296 100644 --- a/facebook-clang-plugins/libtooling/tests/sizeof_static_evaluation.cpp +++ b/facebook-clang-plugins/libtooling/tests/sizeof_static_evaluation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/struct.cpp b/facebook-clang-plugins/libtooling/tests/struct.cpp index c5a5c000a..7f9e7868e 100644 --- a/facebook-clang-plugins/libtooling/tests/struct.cpp +++ b/facebook-clang-plugins/libtooling/tests/struct.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/template_instantiations.cpp b/facebook-clang-plugins/libtooling/tests/template_instantiations.cpp index c1680e04a..c6660d319 100644 --- a/facebook-clang-plugins/libtooling/tests/template_instantiations.cpp +++ b/facebook-clang-plugins/libtooling/tests/template_instantiations.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/this.cpp b/facebook-clang-plugins/libtooling/tests/this.cpp index 7e7bde842..88811c664 100644 --- a/facebook-clang-plugins/libtooling/tests/this.cpp +++ b/facebook-clang-plugins/libtooling/tests/this.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/type_trait.cpp b/facebook-clang-plugins/libtooling/tests/type_trait.cpp index 5c87932e0..7f9470bee 100644 --- a/facebook-clang-plugins/libtooling/tests/type_trait.cpp +++ b/facebook-clang-plugins/libtooling/tests/type_trait.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/unresolved_lookup.cpp b/facebook-clang-plugins/libtooling/tests/unresolved_lookup.cpp index de013a18d..d2904d7f9 100644 --- a/facebook-clang-plugins/libtooling/tests/unresolved_lookup.cpp +++ b/facebook-clang-plugins/libtooling/tests/unresolved_lookup.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/using_directive.cpp b/facebook-clang-plugins/libtooling/tests/using_directive.cpp index be327f5d4..d222c61cb 100644 --- a/facebook-clang-plugins/libtooling/tests/using_directive.cpp +++ b/facebook-clang-plugins/libtooling/tests/using_directive.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/libtooling/tests/virtual_bases.cpp b/facebook-clang-plugins/libtooling/tests/virtual_bases.cpp index 3002f066b..ee99868df 100644 --- a/facebook-clang-plugins/libtooling/tests/virtual_bases.cpp +++ b/facebook-clang-plugins/libtooling/tests/virtual_bases.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-present, Facebook, Inc. + * 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. diff --git a/facebook-clang-plugins/scripts/run_test.sh b/facebook-clang-plugins/scripts/run_test.sh index a6392ce92..feae12405 100755 --- a/facebook-clang-plugins/scripts/run_test.sh +++ b/facebook-clang-plugins/scripts/run_test.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2014-present, Facebook, Inc. +# 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.