From 847c141912f00d09211b6da0d35c669a3259977b Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Wed, 21 Sep 2016 00:25:15 -0700 Subject: [PATCH] [tests] Clean up test files shared between frontend and endtoend tests Reviewed By: jberdine Differential Revision: D3893900 fbshipit-source-id: 497effc --- infer/tests/codetoanalyze/cpp/errors/Makefile | 39 ++- .../cpp/errors/attributes/deprecated_hack.cpp | 1 - .../errors/conditional/lvalue_conditional.cpp | 1 - .../errors/constructors/constructor_init.cpp | 1 - .../errors/constructors/constructor_new.cpp | 1 - .../constructors/constructor_with_body.cpp | 1 - .../constructors/copy_move_constructor.cpp | 1 - .../cpp/errors/constructors/temp_object.cpp | 1 - .../cpp/errors/exceptions/Exceptions.cpp | 1 - .../errors/include_header/include_templ.cpp | 2 + .../tests/codetoanalyze/cpp/errors/issues.exp | 326 +++++++++--------- .../cpp/errors/lambda/lambda1.cpp | 1 - .../errors/methods/conversion_operator.cpp | 1 - .../cpp/errors/methods/static.cpp | 1 - .../cpp/errors/methods/virtual_methods.cpp | 1 - .../cpp/errors/namespace/function.cpp | 1 - .../cpp/errors/namespace/global_variable.cpp | 1 - .../nestedoperators/var_decl_inside_if.cpp | 1 - .../cpp/errors/reference/reference_field.cpp | 1 - .../errors/reference/reference_struct_e2e.cpp | 1 - .../errors/reference/reference_type_e2e.cpp | 1 - .../cpp/errors/reference/temporary_lvalue.cpp | 1 - infer/tests/codetoanalyze/cpp/errors/shared | 1 + .../subtyping/cast_with_enforce.cpp.dot | 149 -------- .../templates/class_template_instantiate.cpp | 1 - .../cpp/errors/templates/function.cpp | 1 - .../cpp/errors/templates/function_pack.cpp | 1 - .../cpp/errors/templates/method.cpp | 1 - .../cpp/errors/types/inheritance_field.cpp | 1 - .../cpp/errors/types/operator_overload.cpp | 1 - .../cpp/errors/types/return_struct.cpp | 1 - .../errors/types/struct_forward_declare.cpp | 1 - .../cpp/errors/types/struct_pass_by_value.cpp | 1 - .../cpp/errors/types/typeid_expr.cpp | 1 - .../tests/codetoanalyze/cpp/frontend/Makefile | 2 +- .../conditional/binary_conditional.cpp.dot | 134 ------- .../include_header/include_no_templ.cpp.dot | 46 --- .../cpp/frontend/lambda/lambda1.cpp.dot | 128 ------- infer/tests/codetoanalyze/cpp/frontend/shared | 1 + .../attributes/deprecated_hack.cpp | 0 .../attributes/deprecated_hack.cpp.dot | 0 .../conditional/binary_conditional.cpp | 3 + .../conditional/binary_conditional.cpp.dot | 134 +++++++ .../conditional/lvalue_conditional.cpp | 0 .../conditional/lvalue_conditional.cpp.dot | 0 .../constructors/constructor_array.cpp | 0 .../constructors/constructor_array.cpp.dot | 0 .../constructors/constructor_default_arg.cpp | 0 .../constructor_default_arg.cpp.dot | 0 .../constructors/constructor_init.cpp | 0 .../constructors/constructor_init.cpp.dot | 0 .../constructors/constructor_new.cpp | 0 .../constructors/constructor_new.cpp.dot | 0 .../constructor_struct_init_list.cpp | 0 .../constructor_struct_init_list.cpp.dot | 0 .../constructors/constructor_with_body.cpp | 0 .../constructor_with_body.cpp.dot | 0 .../constructors/copy_move_constructor.cpp | 0 .../copy_move_constructor.cpp.dot | 0 .../constructors/default_field_init.cpp | 0 .../constructors/default_field_init.cpp.dot | 0 .../constructors/std_init_list.cpp | 0 .../constructors/std_init_list.cpp.dot | 0 .../constructors/temp_object.cpp | 0 .../constructors/temp_object.cpp.dot | 0 .../exceptions/Exceptions.cpp | 0 .../exceptions/Exceptions.cpp.dot | 0 .../exceptions/noexception.cpp | 0 .../exceptions/noexception.cpp.dot | 0 .../{frontend => shared}/lambda/lambda1.cpp | 0 .../cpp/shared/lambda/lambda1.cpp.dot | 128 +++++++ .../methods/conversion_operator.cpp | 0 .../methods/conversion_operator.cpp.dot | 0 .../methods/default_parameters.cpp | 0 .../methods/default_parameters.cpp.dot | 0 .../methods/dereference_this.cpp | 0 .../methods/dereference_this.cpp.dot | 0 .../methods/inline_method.cpp | 0 .../methods/inline_method.cpp.dot | 0 .../methods/overloading.cpp | 0 .../methods/overloading.cpp.dot | 0 .../methods/return_struct.cpp | 0 .../methods/return_struct.cpp.dot | 0 .../{frontend => shared}/methods/static.cpp | 0 .../methods/static.cpp.dot | 0 .../methods/virtual_methods.cpp | 0 .../methods/virtual_methods.cpp.dot | 0 .../namespace/function.cpp | 0 .../namespace/function.cpp.dot | 0 .../namespace/global_variable.cpp | 0 .../namespace/global_variable.cpp.dot | 0 .../namespace/namespace.cpp | 0 .../namespace/namespace.cpp.dot | 0 .../nestedoperators/var_decl_inside_for.cpp | 0 .../var_decl_inside_for.cpp.dot | 0 .../nestedoperators/var_decl_inside_if.cpp | 0 .../var_decl_inside_if.cpp.dot | 0 .../var_decl_inside_switch.cpp | 0 .../var_decl_inside_switch.cpp.dot | 0 .../nestedoperators/var_decl_inside_while.cpp | 0 .../var_decl_inside_while.cpp.dot | 0 .../{errors => shared}/npe/method_call.cpp | 0 .../npe/method_call.cpp.dot | 0 .../{frontend => shared}/reference/box.cpp | 0 .../reference/box.cpp.dot | 0 .../reference/increment.cpp | 0 .../reference/increment.cpp.dot | 0 .../{frontend => shared}/reference/init.cpp | 0 .../reference/init.cpp.dot | 0 .../reference/member_access.cpp | 0 .../reference/member_access.cpp.dot | 0 .../reference/member_access_from_return.cpp | 0 .../member_access_from_return.cpp.dot | 0 .../reference/nested_assignment.cpp | 0 .../reference/nested_assignment.cpp.dot | 0 .../reference/reference_field.cpp | 0 .../reference/reference_field.cpp.dot | 0 .../reference/reference_struct_e2e.cpp | 0 .../reference/reference_struct_e2e.cpp.dot | 0 .../reference/reference_type_e2e.cpp | 0 .../reference/reference_type_e2e.cpp.dot | 0 .../reference/temporary_lvalue.cpp | 0 .../reference/temporary_lvalue.cpp.dot | 0 .../{frontend => shared}/reference/unbox.cpp | 0 .../reference/unbox.cpp.dot | 0 .../templates/class_template_instantiate.cpp | 0 .../class_template_instantiate.cpp.dot | 0 .../templates/function.cpp | 0 .../templates/function.cpp.dot | 0 .../templates/function_pack.cpp | 0 .../templates/function_pack.cpp.dot | 0 .../{frontend => shared}/templates/method.cpp | 0 .../templates/method.cpp.dot | 0 .../{frontend => shared}/templates/simple.cpp | 0 .../templates/simple.cpp.dot | 0 .../templates/sizeof_pack.cpp | 0 .../templates/sizeof_pack.cpp.dot | 0 .../cpp/{frontend => shared}/types/casts.cpp | 0 .../{frontend => shared}/types/casts.cpp.dot | 0 .../{frontend => shared}/types/functions.cpp | 0 .../types/functions.cpp.dot | 0 .../types/inheritance.cpp | 0 .../types/inheritance.cpp.dot | 0 .../types/inheritance_field.cpp | 0 .../types/inheritance_field.cpp.dot | 0 .../types/operator_overload.cpp | 0 .../types/operator_overload.cpp.dot | 0 .../types/return_struct.cpp | 0 .../types/return_struct.cpp.dot | 0 .../cpp/{frontend => shared}/types/struct.cpp | 0 .../{frontend => shared}/types/struct.cpp.dot | 0 .../types/struct_forward_declare.cpp | 0 .../types/struct_forward_declare.cpp.dot | 0 .../types/struct_pass_by_value.cpp | 0 .../types/struct_pass_by_value.cpp.dot | 0 .../types/type_trait_expr.cpp | 0 .../types/type_trait_expr.cpp.dot | 0 .../types/typeid_expr.cpp | 0 .../types/typeid_expr.cpp.dot | 0 .../tests/codetoanalyze/objc/errors/Makefile | 54 +-- .../objc/errors/frontend/BlockVar.h | 1 - .../objc/errors/frontend/BlockVar.m | 1 - .../objc/errors/frontend/GetterExample.h | 1 - .../objc/errors/frontend/GetterExample.m | 1 - .../objc/errors/frontend/NSAssert_example.m | 1 - .../objc/errors/frontend/PropertyAttributes.m | 1 - .../objc/errors/frontend/block-it.m | 1 - .../objc/errors/frontend/block.m | 1 - .../objc/errors/frontend/block_no_args.m | 1 - .../objc/errors/frontend/block_release.m | 1 - .../objc/errors/frontend/compound_literal.c | 1 - .../objc/errors/frontend/dispatch.m | 1 - .../objc/errors/frontend/dispatch_examples.m | 1 - .../objc/errors/frontend/dispatch_in_macro.m | 1 - .../errors/frontend/struct_initlistexpr.c | 1 - .../errors/initialization/compound_literal.c | 20 ++ .../initialization/struct_initlistexpr.c | 60 ++++ .../codetoanalyze/objc/errors/issues.exp | 72 ++-- infer/tests/codetoanalyze/objc/errors/shared | 1 + .../codetoanalyze/objc/frontend/Makefile | 47 +-- .../objc/frontend/link_to_errors | 1 - .../tests/codetoanalyze/objc/frontend/shared | 1 + .../tests/codetoanalyze/objc/linters/Makefile | 2 +- .../assertions/NSAssert_example.m | 0 .../assertions/NSAssert_example.m.dot | 8 +- .../{frontend => shared}/block/BlockVar.h | 0 .../{frontend => shared}/block/BlockVar.m | 0 .../{frontend => shared}/block/BlockVar.m.dot | 0 .../{frontend => shared}/block/block-it.m | 0 .../{frontend => shared}/block/block-it.m.dot | 0 .../objc/{frontend => shared}/block/block.m | 0 .../{frontend => shared}/block/block.m.dot | 0 .../block/block_no_args.m | 0 .../block/block_no_args.m.dot | 0 .../block/block_release.m | 0 .../block/block_release.m.dot | 0 .../{frontend => shared}/block/dispatch.m | 0 .../{frontend => shared}/block/dispatch.m.dot | 0 .../block/dispatch_examples.m | 0 .../block/dispatch_examples.m.dot | 0 .../block/dispatch_in_macro.m | 0 .../objc/shared/block/dispatch_in_macro.m.dot | 25 ++ .../category_procdesc/EOCPerson.h | 0 .../category_procdesc/EOCPerson.m | 0 .../category_procdesc/EOCPerson.m.dot | 0 .../category_procdesc/main.c | 0 .../category_procdesc/main.c.dot | 0 .../field_superclass/SuperExample.m | 0 .../field_superclass/SuperExample.m.dot | 0 .../memory_leaks_benchmark/ArcExample.m | 0 .../memory_leaks_benchmark/ArcExample.m.dot | 0 .../AutoreleaseExample.m | 0 .../AutoreleaseExample.m.dot | 4 +- .../MemoryLeakExample.h | 0 .../MemoryLeakExample.m | 0 .../MemoryLeakExample.m.dot | 0 .../RetainReleaseExample.m | 0 .../RetainReleaseExample.m.dot | 0 .../RetainReleaseExample2.m | 0 .../RetainReleaseExample2.m.dot | 0 .../TollBridgeExample.m | 0 .../TollBridgeExample.m.dot | 0 .../memory_leaks_benchmark/arc_methods.m | 0 .../memory_leaks_benchmark/arc_methods.m.dot | 0 .../npe/Nonnull_attribute_example.m | 0 .../npe/Nonnull_attribute_example.m.dot | 0 .../objc/{errors => shared}/npe/npe_malloc.m | 0 .../{errors => shared}/npe/npe_malloc.m.dot | 0 .../property/GetterExample.h | 0 .../property/GetterExample.m | 0 .../objc/shared/property/GetterExample.m.dot | 22 ++ .../property/PropertyAttributes.m | 0 .../property/PropertyAttributes.m.dot | 4 +- .../protocol_procdesc/Bicycle.h | 0 .../protocol_procdesc/Bicycle.m | 0 .../shared/protocol_procdesc/Bicycle.m.dot | 69 ++++ .../protocol_procdesc/StreetVehicle.h | 0 .../protocol_procdesc/main.c | 0 .../protocol_procdesc/main.c.dot | 0 .../codetoanalyze/objcpp/linters/Makefile | 2 +- 240 files changed, 760 insertions(+), 769 deletions(-) delete mode 120000 infer/tests/codetoanalyze/cpp/errors/attributes/deprecated_hack.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/conditional/lvalue_conditional.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/constructors/constructor_init.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/constructors/constructor_new.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/constructors/constructor_with_body.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/constructors/copy_move_constructor.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/constructors/temp_object.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/exceptions/Exceptions.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/lambda/lambda1.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/methods/conversion_operator.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/methods/static.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/methods/virtual_methods.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/namespace/function.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/namespace/global_variable.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/nestedoperators/var_decl_inside_if.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/reference/reference_field.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/reference/reference_struct_e2e.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/reference/reference_type_e2e.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/reference/temporary_lvalue.cpp create mode 120000 infer/tests/codetoanalyze/cpp/errors/shared delete mode 100644 infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot delete mode 120000 infer/tests/codetoanalyze/cpp/errors/templates/class_template_instantiate.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/templates/function.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/templates/function_pack.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/templates/method.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/types/inheritance_field.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/types/operator_overload.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/types/return_struct.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/types/struct_forward_declare.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/types/struct_pass_by_value.cpp delete mode 120000 infer/tests/codetoanalyze/cpp/errors/types/typeid_expr.cpp delete mode 100644 infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot delete mode 100644 infer/tests/codetoanalyze/cpp/frontend/include_header/include_no_templ.cpp.dot delete mode 100644 infer/tests/codetoanalyze/cpp/frontend/lambda/lambda1.cpp.dot create mode 120000 infer/tests/codetoanalyze/cpp/frontend/shared rename infer/tests/codetoanalyze/cpp/{frontend => shared}/attributes/deprecated_hack.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/attributes/deprecated_hack.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/conditional/binary_conditional.cpp (94%) create mode 100644 infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot rename infer/tests/codetoanalyze/cpp/{frontend => shared}/conditional/lvalue_conditional.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/conditional/lvalue_conditional.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_array.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_array.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_default_arg.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_default_arg.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_init.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_init.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_new.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_new.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_struct_init_list.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_struct_init_list.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_with_body.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/constructor_with_body.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/copy_move_constructor.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/copy_move_constructor.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/default_field_init.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/default_field_init.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/std_init_list.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/std_init_list.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/temp_object.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/constructors/temp_object.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/exceptions/Exceptions.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/exceptions/Exceptions.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/exceptions/noexception.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/exceptions/noexception.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/lambda/lambda1.cpp (100%) create mode 100644 infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/conversion_operator.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/conversion_operator.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/default_parameters.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/default_parameters.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/dereference_this.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/dereference_this.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/inline_method.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/inline_method.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/overloading.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/overloading.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/return_struct.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/return_struct.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/static.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/static.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/virtual_methods.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/methods/virtual_methods.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/namespace/function.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/namespace/function.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/namespace/global_variable.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/namespace/global_variable.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/namespace/namespace.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/namespace/namespace.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_for.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_for.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_if.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_if.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_switch.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_switch.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_while.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/nestedoperators/var_decl_inside_while.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{errors => shared}/npe/method_call.cpp (100%) rename infer/tests/codetoanalyze/cpp/{errors => shared}/npe/method_call.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/box.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/box.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/increment.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/increment.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/init.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/init.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/member_access.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/member_access.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/member_access_from_return.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/member_access_from_return.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/nested_assignment.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/nested_assignment.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/reference_field.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/reference_field.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/reference_struct_e2e.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/reference_struct_e2e.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/reference_type_e2e.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/reference_type_e2e.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/temporary_lvalue.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/temporary_lvalue.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/unbox.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/reference/unbox.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/class_template_instantiate.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/class_template_instantiate.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/function.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/function.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/function_pack.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/function_pack.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/method.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/method.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/simple.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/simple.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/sizeof_pack.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/templates/sizeof_pack.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/casts.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/casts.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/functions.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/functions.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/inheritance.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/inheritance.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/inheritance_field.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/inheritance_field.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/operator_overload.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/operator_overload.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/return_struct.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/return_struct.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/struct.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/struct.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/struct_forward_declare.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/struct_forward_declare.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/struct_pass_by_value.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/struct_pass_by_value.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/type_trait_expr.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/type_trait_expr.cpp.dot (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/typeid_expr.cpp (100%) rename infer/tests/codetoanalyze/cpp/{frontend => shared}/types/typeid_expr.cpp.dot (100%) delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.h delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.h delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/NSAssert_example.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/PropertyAttributes.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/block-it.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/block.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/block_no_args.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/block_release.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/compound_literal.c delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/dispatch.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/dispatch_examples.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/dispatch_in_macro.m delete mode 120000 infer/tests/codetoanalyze/objc/errors/frontend/struct_initlistexpr.c create mode 100644 infer/tests/codetoanalyze/objc/errors/initialization/compound_literal.c create mode 100644 infer/tests/codetoanalyze/objc/errors/initialization/struct_initlistexpr.c create mode 120000 infer/tests/codetoanalyze/objc/errors/shared delete mode 120000 infer/tests/codetoanalyze/objc/frontend/link_to_errors create mode 120000 infer/tests/codetoanalyze/objc/frontend/shared rename infer/tests/codetoanalyze/objc/{frontend => shared}/assertions/NSAssert_example.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/assertions/NSAssert_example.m.dot (95%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/BlockVar.h (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/BlockVar.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/BlockVar.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block-it.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block-it.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block_no_args.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block_no_args.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block_release.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/block_release.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/dispatch.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/dispatch.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/dispatch_examples.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/dispatch_examples.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/block/dispatch_in_macro.m (100%) create mode 100644 infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot rename infer/tests/codetoanalyze/objc/{errors => shared}/category_procdesc/EOCPerson.h (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/category_procdesc/EOCPerson.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/category_procdesc/EOCPerson.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/category_procdesc/main.c (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/category_procdesc/main.c.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/field_superclass/SuperExample.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/field_superclass/SuperExample.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/ArcExample.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/ArcExample.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/AutoreleaseExample.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/AutoreleaseExample.m.dot (95%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/MemoryLeakExample.h (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/MemoryLeakExample.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/MemoryLeakExample.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/RetainReleaseExample.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/RetainReleaseExample.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/RetainReleaseExample2.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/RetainReleaseExample2.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/TollBridgeExample.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/TollBridgeExample.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/arc_methods.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/memory_leaks_benchmark/arc_methods.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/npe/Nonnull_attribute_example.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/npe/Nonnull_attribute_example.m.dot (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/npe/npe_malloc.m (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/npe/npe_malloc.m.dot (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/property/GetterExample.h (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/property/GetterExample.m (100%) create mode 100644 infer/tests/codetoanalyze/objc/shared/property/GetterExample.m.dot rename infer/tests/codetoanalyze/objc/{frontend => shared}/property/PropertyAttributes.m (100%) rename infer/tests/codetoanalyze/objc/{frontend => shared}/property/PropertyAttributes.m.dot (93%) rename infer/tests/codetoanalyze/objc/{errors => shared}/protocol_procdesc/Bicycle.h (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/protocol_procdesc/Bicycle.m (100%) create mode 100644 infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.m.dot rename infer/tests/codetoanalyze/objc/{errors => shared}/protocol_procdesc/StreetVehicle.h (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/protocol_procdesc/main.c (100%) rename infer/tests/codetoanalyze/objc/{errors => shared}/protocol_procdesc/main.c.dot (100%) diff --git a/infer/tests/codetoanalyze/cpp/errors/Makefile b/infer/tests/codetoanalyze/cpp/errors/Makefile index 35f01956d..1e0aa33ce 100644 --- a/infer/tests/codetoanalyze/cpp/errors/Makefile +++ b/infer/tests/codetoanalyze/cpp/errors/Makefile @@ -7,27 +7,50 @@ include ../../Makefile.clang -OPTIONS = -x c++ -std=c++11 -isystem$(CLANG_INCLUDES)/c++/v1/ -c +OPTIONS = -x c++ -std=c++11 -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c FILES = \ - attributes/*.cpp \ - conditional/*.cpp \ - constructors/*.cpp \ c_tests/*.cpp \ - exceptions/*.cpp \ include_header/header.h \ include_header/include_templ.cpp \ - lambda/*.cpp \ memory_leaks/*.cpp \ - methods/*.cpp \ models/*.cpp \ - namespace/*.cpp \ nestedoperators/*.cpp \ npe/*.cpp \ numeric/*.cpp \ overwrite_attribute/*.cpp \ reference/*.cpp \ resource_leaks/*.cpp \ + shared/attributes/*.cpp \ + shared/conditional/*.cpp \ + shared/constructors/constructor_init.cpp \ + shared/constructors/constructor_new.cpp \ + shared/constructors/constructor_with_body.cpp \ + shared/constructors/copy_move_constructor.cpp \ + shared/constructors/temp_object.cpp \ + shared/exceptions/Exceptions.cpp \ + shared/lambda/*.cpp \ + shared/methods/conversion_operator.cpp \ + shared/methods/static.cpp \ + shared/namespace/function.cpp \ + shared/namespace/global_variable.cpp \ + shared/methods/virtual_methods.cpp \ + shared/nestedoperators/var_decl_inside_if.cpp \ + shared/npe/*.cpp \ + shared/reference/reference_field.cpp \ + shared/reference/reference_struct_e2e.cpp \ + shared/reference/reference_type_e2e.cpp \ + shared/reference/temporary_lvalue.cpp \ + shared/templates/class_template_instantiate.cpp \ + shared/templates/function.cpp \ + shared/templates/function_pack.cpp \ + shared/templates/method.cpp \ + shared/types/inheritance_field.cpp \ + shared/types/operator_overload.cpp \ + shared/types/return_struct.cpp \ + shared/types/struct_forward_declare.cpp \ + shared/types/struct_pass_by_value.cpp \ + shared/types/typeid_expr.cpp \ smart_ptr/*.cpp \ subtyping/*.cpp \ templates/*.cpp \ diff --git a/infer/tests/codetoanalyze/cpp/errors/attributes/deprecated_hack.cpp b/infer/tests/codetoanalyze/cpp/errors/attributes/deprecated_hack.cpp deleted file mode 120000 index e4acff852..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/attributes/deprecated_hack.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/attributes/deprecated_hack.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/conditional/lvalue_conditional.cpp b/infer/tests/codetoanalyze/cpp/errors/conditional/lvalue_conditional.cpp deleted file mode 120000 index 55e14d880..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/conditional/lvalue_conditional.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/conditional/lvalue_conditional.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_init.cpp b/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_init.cpp deleted file mode 120000 index 22e5c28a0..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_init.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/constructors/constructor_init.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_new.cpp b/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_new.cpp deleted file mode 120000 index 7240be4cb..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_new.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/constructors/constructor_new.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_with_body.cpp b/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_with_body.cpp deleted file mode 120000 index a2009c75e..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/constructors/constructor_with_body.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/constructors/constructor_with_body.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/constructors/copy_move_constructor.cpp b/infer/tests/codetoanalyze/cpp/errors/constructors/copy_move_constructor.cpp deleted file mode 120000 index 2ff1b5e24..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/constructors/copy_move_constructor.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/constructors/copy_move_constructor.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/constructors/temp_object.cpp b/infer/tests/codetoanalyze/cpp/errors/constructors/temp_object.cpp deleted file mode 120000 index 2efc53a49..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/constructors/temp_object.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/constructors/temp_object.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/exceptions/Exceptions.cpp b/infer/tests/codetoanalyze/cpp/errors/exceptions/Exceptions.cpp deleted file mode 120000 index e0717eb9b..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/exceptions/Exceptions.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/exceptions/Exceptions.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/include_header/include_templ.cpp b/infer/tests/codetoanalyze/cpp/errors/include_header/include_templ.cpp index 29cf6b6c6..e0b8e5551 100644 --- a/infer/tests/codetoanalyze/cpp/errors/include_header/include_templ.cpp +++ b/infer/tests/codetoanalyze/cpp/errors/include_header/include_templ.cpp @@ -9,6 +9,8 @@ #include "header2.h" +using namespace header2; + // instantiate templates to produce bug reports for them void div0_B_int() { B b; diff --git a/infer/tests/codetoanalyze/cpp/errors/issues.exp b/infer/tests/codetoanalyze/cpp/errors/issues.exp index 6ee7e6030..2531a27d1 100644 --- a/infer/tests/codetoanalyze/cpp/errors/issues.exp +++ b/infer/tests/codetoanalyze/cpp/errors/issues.exp @@ -1,12 +1,3 @@ -attributes/deprecated_hack.cpp, derefFirstArg2_null_deref, 2, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, derefFirstArg3_null_deref, 2, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, derefFirstArg_null_deref, 2, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, getPtr_null_deref1, 3, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, getPtr_null_deref2, 3, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, getRef_null_deref1, 3, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, getRef_null_deref2, 3, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, operator_star_null_deref1, 3, NULL_DEREFERENCE -attributes/deprecated_hack.cpp, operator_star_null_deref2, 3, NULL_DEREFERENCE c_tests/c_bugs.cpp, crash_fgetc, 4, NULL_DEREFERENCE c_tests/c_bugs.cpp, crash_getc, 4, NULL_DEREFERENCE c_tests/c_bugs.cpp, malloc_fail_gets_reported, 2, NULL_DEREFERENCE @@ -14,94 +5,21 @@ c_tests/c_bugs.cpp, malloc_memory_leak_is_reported, 0, MEMORY_LEAK c_tests/c_bugs.cpp, memcpy_spec_is_found, 3, NULL_DEREFERENCE c_tests/c_bugs.cpp, resource_leak_is_reported, 0, RESOURCE_LEAK c_tests/c_bugs.cpp, resource_leak_is_reported, 0, RETURN_VALUE_IGNORED -conditional/lvalue_conditional.cpp, div0_assign_conditional, 0, DIVIDE_BY_ZERO -conditional/lvalue_conditional.cpp, div0_choose_lvalue, 0, DIVIDE_BY_ZERO -conditional/lvalue_conditional.cpp, div0_choose_rvalue, 0, DIVIDE_BY_ZERO -conditional/lvalue_conditional.cpp, div0_temp_lvalue, 0, DIVIDE_BY_ZERO -constructors/constructor_init.cpp, delegate_constr_f2_div0, 3, DIVIDE_BY_ZERO -constructors/constructor_init.cpp, delegate_constr_f_div0, 3, DIVIDE_BY_ZERO -constructors/constructor_init.cpp, f2_div0, 2, DIVIDE_BY_ZERO -constructors/constructor_init.cpp, f_div0, 2, DIVIDE_BY_ZERO -constructors/constructor_init.cpp, t_div0, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::array_of_class_with_not_constant_size, 1, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::array_of_person_with_constant_size, 0, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::constructor_1_arg_new_div0, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::constructor_1_arg_new_div0, 2, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::constructor_3_args_new_div0, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::constructor_3_args_new_div0, 2, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::constructor_nodes, 3, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::constructor_nodes, 3, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::float_init_number, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::float_init_number, 2, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::int_array, 4, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::int_array, 4, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::int_array_init, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::int_array_init, 2, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::int_init_empty, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::int_init_empty, 2, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::int_init_empty_list, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 2, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::int_init_nodes, 3, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::int_init_nodes, 4, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::int_init_nodes, 4, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::int_init_number, 2, DIVIDE_BY_ZERO -constructors/constructor_new.cpp, constructor_new::int_init_number, 2, MEMORY_LEAK -constructors/constructor_new.cpp, constructor_new::matrix_of_person, 2, MEMORY_LEAK -constructors/constructor_with_body.cpp, constructor_with_body::test_div0, 2, DIVIDE_BY_ZERO -constructors/constructor_with_body.cpp, constructor_with_body::test_div0_default_constructor, 2, DIVIDE_BY_ZERO -constructors/copy_move_constructor.cpp, copy_move_constructor::copyX_div0, 4, DIVIDE_BY_ZERO -constructors/copy_move_constructor.cpp, copy_move_constructor::copyY_div0, 4, DIVIDE_BY_ZERO -constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO -constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO -constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_moveY_copyY_div0, 3, DIVIDE_BY_ZERO -constructors/temp_object.cpp, temp_object::assign_temp_div0, 2, DIVIDE_BY_ZERO -constructors/temp_object.cpp, temp_object::getX_field_div0, 0, DIVIDE_BY_ZERO -constructors/temp_object.cpp, temp_object::getX_method_div0, 0, DIVIDE_BY_ZERO -constructors/temp_object.cpp, temp_object::temp_field2_div0, 0, DIVIDE_BY_ZERO -constructors/temp_object.cpp, temp_object::temp_field_div0, 0, DIVIDE_BY_ZERO -constructors/temp_object.cpp, temp_object::temp_method_div0, 0, DIVIDE_BY_ZERO -exceptions/Exceptions.cpp, call_deref_with_null, 0, NULL_DEREFERENCE include_header/header.h, header::A_div0, 0, DIVIDE_BY_ZERO include_header/header.h, header::div0_fun, 0, DIVIDE_BY_ZERO include_header/header2.h, header2::B_div0, 0, DIVIDE_BY_ZERO include_header/header2.h, header2::B_div0, 0, DIVIDE_BY_ZERO include_header/header2.h, header2::div0_templ, 1, DIVIDE_BY_ZERO include_header/header2.h, header2::div0_templ, 1, DIVIDE_BY_ZERO -lambda/lambda1.cpp, bar, 5, DIVIDE_BY_ZERO -lambda/lambda1.cpp, foo, 3, DIVIDE_BY_ZERO -lambda/lambda1.cpp, foo::lambda_lambda_lambda1.cpp:19:17_operator(), 0, DIVIDE_BY_ZERO memory_leaks/array_leak.cpp, leak, 4, MEMORY_LEAK memory_leaks/object_leak.cpp, object_leak, 0, MEMORY_LEAK memory_leaks/raii_malloc.cpp, memory_leak, 0, MEMORY_LEAK -methods/conversion_operator.cpp, conversion_operator::branch_div0, 4, DIVIDE_BY_ZERO -methods/conversion_operator.cpp, conversion_operator::y_branch_div0, 6, DIVIDE_BY_ZERO -methods/static.cpp, div0_class, 0, DIVIDE_BY_ZERO -methods/static.cpp, div0_instance, 2, DIVIDE_BY_ZERO -methods/virtual_methods.cpp, poly_area, 3, DIVIDE_BY_ZERO -methods/virtual_methods.cpp, rect_area, 4, DIVIDE_BY_ZERO -methods/virtual_methods.cpp, tri_area, 5, DIVIDE_BY_ZERO -methods/virtual_methods.cpp, tri_not_virtual_area, 5, DIVIDE_BY_ZERO models/move.cpp, move::div0_moved_from, 3, DIVIDE_BY_ZERO models/move.cpp, move::div0_moved_to, 3, DIVIDE_BY_ZERO -namespace/function.cpp, div0_namespace_resolution, 0, DIVIDE_BY_ZERO -namespace/function.cpp, div0_using, 2, DIVIDE_BY_ZERO -namespace/global_variable.cpp, div0_namepace_res, 3, DIVIDE_BY_ZERO -namespace/global_variable.cpp, div0_static_field, 3, DIVIDE_BY_ZERO -namespace/global_variable.cpp, div0_static_field_member_access, 3, DIVIDE_BY_ZERO -nestedoperators/var_decl_inside_if.cpp, conditional_init_div0, 2, DIVIDE_BY_ZERO -nestedoperators/var_decl_inside_if.cpp, function_call_init_div0, 2, DIVIDE_BY_ZERO -nestedoperators/var_decl_inside_if.cpp, reference_init_div0, 5, DIVIDE_BY_ZERO -nestedoperators/var_decl_inside_if.cpp, simple_inif_elseif_div0, 6, DIVIDE_BY_ZERO -nestedoperators/var_decl_inside_if.cpp, simple_init_div0, 4, DIVIDE_BY_ZERO -nestedoperators/var_decl_inside_if.cpp, simple_init_null_deref, 4, NULL_DEREFERENCE npe/boxed_ptr.cpp, boxed_ptr::smart_ptr_null_field_deref, 2, NULL_DEREFERENCE npe/boxed_ptr.cpp, boxed_ptr::smart_ptr_null_method_deref, 2, NULL_DEREFERENCE npe/boxed_ptr.cpp, boxed_ptr::smart_ptr_null_method_deref2, 2, NULL_DEREFERENCE npe/boxed_ptr.cpp, boxed_ptr::smart_ptr_result_method_null_deref, 4, NULL_DEREFERENCE -npe/method_call.cpp, npe_call, 2, NULL_DEREFERENCE -npe/method_call.cpp, npe_call_after_call, 0, NULL_DEREFERENCE -npe/method_call.cpp, npe_call_with_forward_declaration, 1, NULL_DEREFERENCE npe/npe_added_to_b1.cpp, npe_added_to_b1::causes_npe, 2, NULL_DEREFERENCE npe/npe_added_to_b1.cpp, npe_added_to_b1::causes_npe_person, 2, NULL_DEREFERENCE npe/null_returned_by_method.cpp, testNullDeref, 3, NULL_DEREFERENCE @@ -117,37 +35,170 @@ numeric/min_max.cpp, max_int_div0, 0, DIVIDE_BY_ZERO numeric/min_max.cpp, min_X_div0, 2, DIVIDE_BY_ZERO numeric/min_max.cpp, min_int_div0, 0, DIVIDE_BY_ZERO overwrite_attribute/main.cpp, testSetIntValue, 3, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ptr_F_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ptr_I_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ptr_getF_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ptr_getI_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ref_F_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ref_I_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ref_getF_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::ref_getI_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::val_F_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::val_I_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::val_getF_div0, 5, DIVIDE_BY_ZERO -reference/reference_field.cpp, reference_field::val_getI_div0, 5, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, field_div0_ptr, 3, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, field_div0_ref, 2, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, get_global_ptr_div0_field, 3, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, get_global_ptr_div0_method, 3, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, get_global_ref_div0_field, 3, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, get_global_ref_div0_method, 3, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, method_div0_ptr, 3, DIVIDE_BY_ZERO -reference/reference_struct_e2e.cpp, method_div0_ref, 2, DIVIDE_BY_ZERO -reference/reference_type_e2e.cpp, ptr_div0, 4, DIVIDE_BY_ZERO -reference/reference_type_e2e.cpp, ptr_div0_function, 3, DIVIDE_BY_ZERO -reference/reference_type_e2e.cpp, ptr_div0_function_temp_var, 4, DIVIDE_BY_ZERO -reference/reference_type_e2e.cpp, ref_div0, 4, DIVIDE_BY_ZERO -reference/reference_type_e2e.cpp, ref_div0_function, 3, DIVIDE_BY_ZERO -reference/reference_type_e2e.cpp, ref_div0_function_temp_var, 4, DIVIDE_BY_ZERO -reference/reference_type_e2e.cpp, ref_div0_nested_assignment, 6, DIVIDE_BY_ZERO -reference/temporary_lvalue.cpp, div0_function_param_cast, 0, DIVIDE_BY_ZERO -reference/temporary_lvalue.cpp, div0_init_expr, 2, DIVIDE_BY_ZERO -reference/temporary_lvalue.cpp, div0_no_const_ref, 2, DIVIDE_BY_ZERO resource_leaks/raii.cpp, resource_leak, 7, RESOURCE_LEAK +shared/attributes/deprecated_hack.cpp, derefFirstArg2_null_deref, 2, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, derefFirstArg3_null_deref, 2, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, derefFirstArg_null_deref, 2, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, getPtr_null_deref1, 3, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, getPtr_null_deref2, 3, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, getRef_null_deref1, 3, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, getRef_null_deref2, 3, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, operator_star_null_deref1, 3, NULL_DEREFERENCE +shared/attributes/deprecated_hack.cpp, operator_star_null_deref2, 3, NULL_DEREFERENCE +shared/conditional/lvalue_conditional.cpp, div0_assign_conditional, 0, DIVIDE_BY_ZERO +shared/conditional/lvalue_conditional.cpp, div0_choose_lvalue, 0, DIVIDE_BY_ZERO +shared/conditional/lvalue_conditional.cpp, div0_choose_rvalue, 0, DIVIDE_BY_ZERO +shared/conditional/lvalue_conditional.cpp, div0_temp_lvalue, 0, DIVIDE_BY_ZERO +shared/constructors/constructor_init.cpp, delegate_constr_f2_div0, 3, DIVIDE_BY_ZERO +shared/constructors/constructor_init.cpp, delegate_constr_f_div0, 3, DIVIDE_BY_ZERO +shared/constructors/constructor_init.cpp, f2_div0, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_init.cpp, f_div0, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_init.cpp, t_div0, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::array_of_class_with_not_constant_size, 1, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::array_of_person_with_constant_size, 0, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::constructor_1_arg_new_div0, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::constructor_1_arg_new_div0, 2, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::constructor_3_args_new_div0, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::constructor_3_args_new_div0, 2, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::constructor_nodes, 3, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::constructor_nodes, 3, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::float_init_number, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::float_init_number, 2, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::int_array, 4, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::int_array, 4, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::int_array_init, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::int_array_init, 2, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::int_init_empty, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::int_init_empty, 2, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::int_init_empty_list_new, 2, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 3, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 4, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::int_init_nodes, 4, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::int_init_number, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_new.cpp, constructor_new::int_init_number, 2, MEMORY_LEAK +shared/constructors/constructor_new.cpp, constructor_new::matrix_of_person, 2, MEMORY_LEAK +shared/constructors/constructor_with_body.cpp, constructor_with_body::test_div0, 2, DIVIDE_BY_ZERO +shared/constructors/constructor_with_body.cpp, constructor_with_body::test_div0_default_constructor, 2, DIVIDE_BY_ZERO +shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyX_div0, 4, DIVIDE_BY_ZERO +shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyY_div0, 4, DIVIDE_BY_ZERO +shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO +shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO +shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_moveY_copyY_div0, 3, DIVIDE_BY_ZERO +shared/constructors/temp_object.cpp, temp_object::assign_temp_div0, 2, DIVIDE_BY_ZERO +shared/constructors/temp_object.cpp, temp_object::getX_field_div0, 0, DIVIDE_BY_ZERO +shared/constructors/temp_object.cpp, temp_object::getX_method_div0, 0, DIVIDE_BY_ZERO +shared/constructors/temp_object.cpp, temp_object::temp_field2_div0, 0, DIVIDE_BY_ZERO +shared/constructors/temp_object.cpp, temp_object::temp_field_div0, 0, DIVIDE_BY_ZERO +shared/constructors/temp_object.cpp, temp_object::temp_method_div0, 0, DIVIDE_BY_ZERO +shared/exceptions/Exceptions.cpp, call_deref_with_null, 0, NULL_DEREFERENCE +shared/lambda/lambda1.cpp, bar, 5, DIVIDE_BY_ZERO +shared/lambda/lambda1.cpp, foo, 3, DIVIDE_BY_ZERO +shared/lambda/lambda1.cpp, foo::lambda_shared_lambda_lambda1.cpp:19:17_operator(), 0, DIVIDE_BY_ZERO +shared/methods/conversion_operator.cpp, conversion_operator::branch_div0, 4, DIVIDE_BY_ZERO +shared/methods/conversion_operator.cpp, conversion_operator::y_branch_div0, 6, DIVIDE_BY_ZERO +shared/methods/static.cpp, div0_class, 0, DIVIDE_BY_ZERO +shared/methods/static.cpp, div0_instance, 2, DIVIDE_BY_ZERO +shared/methods/virtual_methods.cpp, poly_area, 3, DIVIDE_BY_ZERO +shared/methods/virtual_methods.cpp, rect_area, 4, DIVIDE_BY_ZERO +shared/methods/virtual_methods.cpp, tri_area, 5, DIVIDE_BY_ZERO +shared/methods/virtual_methods.cpp, tri_not_virtual_area, 5, DIVIDE_BY_ZERO +shared/namespace/function.cpp, div0_namespace_resolution, 0, DIVIDE_BY_ZERO +shared/namespace/function.cpp, div0_using, 2, DIVIDE_BY_ZERO +shared/namespace/global_variable.cpp, div0_namepace_res, 3, DIVIDE_BY_ZERO +shared/namespace/global_variable.cpp, div0_static_field, 3, DIVIDE_BY_ZERO +shared/namespace/global_variable.cpp, div0_static_field_member_access, 3, DIVIDE_BY_ZERO +shared/nestedoperators/var_decl_inside_if.cpp, conditional_init_div0, 2, DIVIDE_BY_ZERO +shared/nestedoperators/var_decl_inside_if.cpp, function_call_init_div0, 2, DIVIDE_BY_ZERO +shared/nestedoperators/var_decl_inside_if.cpp, reference_init_div0, 5, DIVIDE_BY_ZERO +shared/nestedoperators/var_decl_inside_if.cpp, simple_inif_elseif_div0, 6, DIVIDE_BY_ZERO +shared/nestedoperators/var_decl_inside_if.cpp, simple_init_div0, 4, DIVIDE_BY_ZERO +shared/nestedoperators/var_decl_inside_if.cpp, simple_init_null_deref, 4, NULL_DEREFERENCE +shared/npe/method_call.cpp, npe_call, 2, NULL_DEREFERENCE +shared/npe/method_call.cpp, npe_call_after_call, 0, NULL_DEREFERENCE +shared/npe/method_call.cpp, npe_call_with_forward_declaration, 1, NULL_DEREFERENCE +shared/reference/reference_field.cpp, reference_field::ptr_F_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::ptr_I_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::ptr_getF_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::ptr_getI_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::ref_F_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::ref_I_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::ref_getF_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::ref_getI_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::val_F_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::val_I_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::val_getF_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_field.cpp, reference_field::val_getI_div0, 5, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, field_div0_ptr, 3, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, field_div0_ref, 2, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, get_global_ptr_div0_field, 3, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, get_global_ptr_div0_method, 3, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, get_global_ref_div0_field, 3, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, get_global_ref_div0_method, 3, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, method_div0_ptr, 3, DIVIDE_BY_ZERO +shared/reference/reference_struct_e2e.cpp, method_div0_ref, 2, DIVIDE_BY_ZERO +shared/reference/reference_type_e2e.cpp, ptr_div0, 4, DIVIDE_BY_ZERO +shared/reference/reference_type_e2e.cpp, ptr_div0_function, 3, DIVIDE_BY_ZERO +shared/reference/reference_type_e2e.cpp, ptr_div0_function_temp_var, 4, DIVIDE_BY_ZERO +shared/reference/reference_type_e2e.cpp, ref_div0, 4, DIVIDE_BY_ZERO +shared/reference/reference_type_e2e.cpp, ref_div0_function, 3, DIVIDE_BY_ZERO +shared/reference/reference_type_e2e.cpp, ref_div0_function_temp_var, 4, DIVIDE_BY_ZERO +shared/reference/reference_type_e2e.cpp, ref_div0_nested_assignment, 6, DIVIDE_BY_ZERO +shared/reference/temporary_lvalue.cpp, div0_function_param_cast, 0, DIVIDE_BY_ZERO +shared/reference/temporary_lvalue.cpp, div0_init_expr, 2, DIVIDE_BY_ZERO +shared/reference/temporary_lvalue.cpp, div0_no_const_ref, 2, DIVIDE_BY_ZERO +shared/templates/class_template_instantiate.cpp, ExecStore_call_div, 2, DIVIDE_BY_ZERO +shared/templates/class_template_instantiate.cpp, choose1_div0, 0, DIVIDE_BY_ZERO +shared/templates/class_template_instantiate.cpp, choose2_div0_extra, 0, DIVIDE_BY_ZERO +shared/templates/function.cpp, function::createAndDiv, 1, DIVIDE_BY_ZERO +shared/templates/function.cpp, function::div0_create_and_get_val, 1, DIVIDE_BY_ZERO +shared/templates/function.cpp, function::div0_get_val, 3, DIVIDE_BY_ZERO +shared/templates/function_pack.cpp, div0_10args, 0, DIVIDE_BY_ZERO +shared/templates/function_pack.cpp, div0_1arg, 0, DIVIDE_BY_ZERO +shared/templates/function_pack.cpp, div0_3args1, 0, DIVIDE_BY_ZERO +shared/templates/function_pack.cpp, div0_3args2, 0, DIVIDE_BY_ZERO +shared/templates/function_pack.cpp, div0_3args3, 0, DIVIDE_BY_ZERO +shared/templates/function_pack.cpp, div0_3args4, 0, DIVIDE_BY_ZERO +shared/templates/method.cpp, method::div0_getter, 3, DIVIDE_BY_ZERO +shared/templates/method.cpp, method::div0_getter_templ, 4, DIVIDE_BY_ZERO +shared/templates/method.cpp, method::div0_getter_templ2, 4, DIVIDE_BY_ZERO +shared/types/inheritance_field.cpp, div0_b1, 2, DIVIDE_BY_ZERO +shared/types/inheritance_field.cpp, div0_b1_s, 3, DIVIDE_BY_ZERO +shared/types/inheritance_field.cpp, div0_b2, 2, DIVIDE_BY_ZERO +shared/types/inheritance_field.cpp, div0_cast, 3, DIVIDE_BY_ZERO +shared/types/inheritance_field.cpp, div0_cast_ref, 3, DIVIDE_BY_ZERO +shared/types/inheritance_field.cpp, div0_s, 2, DIVIDE_BY_ZERO +shared/types/inheritance_field.cpp, div0_s_b1, 3, DIVIDE_BY_ZERO +shared/types/operator_overload.cpp, div0_function_op, 3, DIVIDE_BY_ZERO +shared/types/operator_overload.cpp, div0_inheritted_op, 2, DIVIDE_BY_ZERO +shared/types/operator_overload.cpp, div0_method, 3, DIVIDE_BY_ZERO +shared/types/operator_overload.cpp, div0_method_op, 3, DIVIDE_BY_ZERO +shared/types/operator_overload.cpp, div0_method_op_ptr, 0, DIVIDE_BY_ZERO +shared/types/return_struct.cpp, return_struct::get_div0, 2, DIVIDE_BY_ZERO +shared/types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO +shared/types/return_struct.cpp, return_struct::get_method_div0, 0, DIVIDE_BY_ZERO +shared/types/struct_forward_declare.cpp, struct_forward_declare::X_Y_div0, 7, DIVIDE_BY_ZERO +shared/types/struct_forward_declare.cpp, struct_forward_declare::X_div0, 3, DIVIDE_BY_ZERO +shared/types/struct_forward_declare.cpp, struct_forward_declare::X_ptr_div0, 2, DIVIDE_BY_ZERO +shared/types/struct_forward_declare.cpp, struct_forward_declare::Z_div0, 3, DIVIDE_BY_ZERO +shared/types/struct_forward_declare.cpp, struct_forward_declare::Z_ptr_div0, 5, DIVIDE_BY_ZERO +shared/types/struct_pass_by_value.cpp, struct_pass_by_value::field_div0, 3, DIVIDE_BY_ZERO +shared/types/struct_pass_by_value.cpp, struct_pass_by_value::param_get_copied_div0, 3, DIVIDE_BY_ZERO +shared/types/struct_pass_by_value.cpp, struct_pass_by_value::temp_div0, 0, DIVIDE_BY_ZERO +shared/types/struct_pass_by_value.cpp, struct_pass_by_value::var_div0, 2, DIVIDE_BY_ZERO +shared/types/typeid_expr.cpp, employee_typeid, 3, MEMORY_LEAK +shared/types/typeid_expr.cpp, employee_typeid, 4, DIVIDE_BY_ZERO +shared/types/typeid_expr.cpp, person_ptr_typeid, 2, MEMORY_LEAK +shared/types/typeid_expr.cpp, person_ptr_typeid, 3, DIVIDE_BY_ZERO +shared/types/typeid_expr.cpp, person_typeid, 3, MEMORY_LEAK +shared/types/typeid_expr.cpp, person_typeid, 6, DIVIDE_BY_ZERO +shared/types/typeid_expr.cpp, person_typeid_name, 3, MEMORY_LEAK +shared/types/typeid_expr.cpp, person_typeid_name, 4, MEMORY_LEAK +shared/types/typeid_expr.cpp, person_typeid_name, 8, DIVIDE_BY_ZERO +shared/types/typeid_expr.cpp, template_type_id_person, 2, MEMORY_LEAK +shared/types/typeid_expr.cpp, template_type_id_person, 5, DIVIDE_BY_ZERO +shared/types/typeid_expr.cpp, template_typeid, 2, MEMORY_LEAK smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_crash, 4, NULL_DEREFERENCE smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_ok, 4, MEMORY_LEAK smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_ok, 3, MEMORY_LEAK @@ -210,57 +261,6 @@ subtyping/dynamic_cast.cpp, dynamic__cast::wrongPointerCast, 6, DIVIDE_BY_ZERO subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCast, 3, CLASS_CAST_EXCEPTION subtyping/dynamic_cast.cpp, dynamic__cast::wrongReferenceCastNotAssigned, 3, CLASS_CAST_EXCEPTION subtyping/subtyping_check.cpp, B_setFG, 4, DIVIDE_BY_ZERO -templates/class_template_instantiate.cpp, ExecStore_call_div, 2, DIVIDE_BY_ZERO -templates/class_template_instantiate.cpp, choose1_div0, 0, DIVIDE_BY_ZERO -templates/class_template_instantiate.cpp, choose2_div0_extra, 0, DIVIDE_BY_ZERO -templates/function.cpp, function::createAndDiv, 1, DIVIDE_BY_ZERO -templates/function.cpp, function::div0_create_and_get_val, 1, DIVIDE_BY_ZERO -templates/function.cpp, function::div0_get_val, 3, DIVIDE_BY_ZERO -templates/function_pack.cpp, div0_10args, 0, DIVIDE_BY_ZERO -templates/function_pack.cpp, div0_1arg, 0, DIVIDE_BY_ZERO -templates/function_pack.cpp, div0_3args1, 0, DIVIDE_BY_ZERO -templates/function_pack.cpp, div0_3args2, 0, DIVIDE_BY_ZERO -templates/function_pack.cpp, div0_3args3, 0, DIVIDE_BY_ZERO -templates/function_pack.cpp, div0_3args4, 0, DIVIDE_BY_ZERO -templates/method.cpp, method::div0_getter, 3, DIVIDE_BY_ZERO -templates/method.cpp, method::div0_getter_templ, 4, DIVIDE_BY_ZERO -templates/method.cpp, method::div0_getter_templ2, 4, DIVIDE_BY_ZERO -types/inheritance_field.cpp, div0_b1, 2, DIVIDE_BY_ZERO -types/inheritance_field.cpp, div0_b1_s, 3, DIVIDE_BY_ZERO -types/inheritance_field.cpp, div0_b2, 2, DIVIDE_BY_ZERO -types/inheritance_field.cpp, div0_cast, 3, DIVIDE_BY_ZERO -types/inheritance_field.cpp, div0_cast_ref, 3, DIVIDE_BY_ZERO -types/inheritance_field.cpp, div0_s, 2, DIVIDE_BY_ZERO -types/inheritance_field.cpp, div0_s_b1, 3, DIVIDE_BY_ZERO -types/operator_overload.cpp, div0_function_op, 3, DIVIDE_BY_ZERO -types/operator_overload.cpp, div0_inheritted_op, 2, DIVIDE_BY_ZERO -types/operator_overload.cpp, div0_method, 3, DIVIDE_BY_ZERO -types/operator_overload.cpp, div0_method_op, 3, DIVIDE_BY_ZERO -types/operator_overload.cpp, div0_method_op_ptr, 0, DIVIDE_BY_ZERO -types/return_struct.cpp, return_struct::get_div0, 2, DIVIDE_BY_ZERO -types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO -types/return_struct.cpp, return_struct::get_method_div0, 0, DIVIDE_BY_ZERO -types/struct_forward_declare.cpp, struct_forward_declare::X_Y_div0, 7, DIVIDE_BY_ZERO -types/struct_forward_declare.cpp, struct_forward_declare::X_div0, 3, DIVIDE_BY_ZERO -types/struct_forward_declare.cpp, struct_forward_declare::X_ptr_div0, 2, DIVIDE_BY_ZERO -types/struct_forward_declare.cpp, struct_forward_declare::Z_div0, 3, DIVIDE_BY_ZERO -types/struct_forward_declare.cpp, struct_forward_declare::Z_ptr_div0, 5, DIVIDE_BY_ZERO -types/struct_pass_by_value.cpp, struct_pass_by_value::field_div0, 3, DIVIDE_BY_ZERO -types/struct_pass_by_value.cpp, struct_pass_by_value::param_get_copied_div0, 3, DIVIDE_BY_ZERO -types/struct_pass_by_value.cpp, struct_pass_by_value::temp_div0, 0, DIVIDE_BY_ZERO -types/struct_pass_by_value.cpp, struct_pass_by_value::var_div0, 2, DIVIDE_BY_ZERO -types/typeid_expr.cpp, employee_typeid, 3, MEMORY_LEAK -types/typeid_expr.cpp, employee_typeid, 4, DIVIDE_BY_ZERO -types/typeid_expr.cpp, person_ptr_typeid, 2, MEMORY_LEAK -types/typeid_expr.cpp, person_ptr_typeid, 3, DIVIDE_BY_ZERO -types/typeid_expr.cpp, person_typeid, 3, MEMORY_LEAK -types/typeid_expr.cpp, person_typeid, 6, DIVIDE_BY_ZERO -types/typeid_expr.cpp, person_typeid_name, 3, MEMORY_LEAK -types/typeid_expr.cpp, person_typeid_name, 4, MEMORY_LEAK -types/typeid_expr.cpp, person_typeid_name, 8, DIVIDE_BY_ZERO -types/typeid_expr.cpp, template_type_id_person, 2, MEMORY_LEAK -types/typeid_expr.cpp, template_type_id_person, 5, DIVIDE_BY_ZERO -types/typeid_expr.cpp, template_typeid, 2, MEMORY_LEAK vector/empty_access.cpp, access_empty, 2, EMPTY_VECTOR_ACCESS vector/empty_access.cpp, assign_empty, 4, EMPTY_VECTOR_ACCESS vector/empty_access.cpp, clear_empty, 3, EMPTY_VECTOR_ACCESS diff --git a/infer/tests/codetoanalyze/cpp/errors/lambda/lambda1.cpp b/infer/tests/codetoanalyze/cpp/errors/lambda/lambda1.cpp deleted file mode 120000 index 9fc2d94a0..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/lambda/lambda1.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/lambda/lambda1.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/methods/conversion_operator.cpp b/infer/tests/codetoanalyze/cpp/errors/methods/conversion_operator.cpp deleted file mode 120000 index 554401a75..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/methods/conversion_operator.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/methods/conversion_operator.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/methods/static.cpp b/infer/tests/codetoanalyze/cpp/errors/methods/static.cpp deleted file mode 120000 index 399618add..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/methods/static.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/methods/static.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/methods/virtual_methods.cpp b/infer/tests/codetoanalyze/cpp/errors/methods/virtual_methods.cpp deleted file mode 120000 index fd2f309ca..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/methods/virtual_methods.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/methods/virtual_methods.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/namespace/function.cpp b/infer/tests/codetoanalyze/cpp/errors/namespace/function.cpp deleted file mode 120000 index 0ab82d9d7..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/namespace/function.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/namespace/function.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/namespace/global_variable.cpp b/infer/tests/codetoanalyze/cpp/errors/namespace/global_variable.cpp deleted file mode 120000 index 07858ddfc..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/namespace/global_variable.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/namespace/global_variable.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/nestedoperators/var_decl_inside_if.cpp b/infer/tests/codetoanalyze/cpp/errors/nestedoperators/var_decl_inside_if.cpp deleted file mode 120000 index 85910270c..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/nestedoperators/var_decl_inside_if.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/nestedoperators/var_decl_inside_if.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/reference/reference_field.cpp b/infer/tests/codetoanalyze/cpp/errors/reference/reference_field.cpp deleted file mode 120000 index 98eadf454..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/reference/reference_field.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/reference/reference_field.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/reference/reference_struct_e2e.cpp b/infer/tests/codetoanalyze/cpp/errors/reference/reference_struct_e2e.cpp deleted file mode 120000 index 9ef5b5e12..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/reference/reference_struct_e2e.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/reference/reference_struct_e2e.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/reference/reference_type_e2e.cpp b/infer/tests/codetoanalyze/cpp/errors/reference/reference_type_e2e.cpp deleted file mode 120000 index 236239ee6..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/reference/reference_type_e2e.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/reference/reference_type_e2e.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/reference/temporary_lvalue.cpp b/infer/tests/codetoanalyze/cpp/errors/reference/temporary_lvalue.cpp deleted file mode 120000 index 85788e5aa..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/reference/temporary_lvalue.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/reference/temporary_lvalue.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/shared b/infer/tests/codetoanalyze/cpp/errors/shared new file mode 120000 index 000000000..ac3565167 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/errors/shared @@ -0,0 +1 @@ +../shared/ \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot b/infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot deleted file mode 100644 index ba102f4b6..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot +++ /dev/null @@ -1,149 +0,0 @@ -/* @generated */ -digraph iCFG { -38 [label="38: DeclStmt \n _fun_cast_with_enforce::Base_Base(&base:class cast_with_enforce::Base *) [line 54]\n " shape="box"] - - - 38 -> 37 ; -37 [label="37: DeclStmt \n n$2=_fun___cast(&base:class cast_with_enforce::Base *,sizeof(class cast_with_enforce::Derived ( sub )(cast)):void ) [line 55]\n *&derived:class cast_with_enforce::Derived *=n$2 [line 55]\n " shape="box"] - - - 37 -> 36 ; -36 [label="36: Return Stmt \n n$0=*&derived:class cast_with_enforce::Derived * [line 56]\n n$1=*n$0.a:int [line 56]\n *&return:int =n$1 [line 56]\n " shape="box"] - - - 36 -> 35 ; -35 [label="35: Exit cast_with_enforce::cast_with_npe \n " color=yellow style=filled] - - -34 [label="34: Start cast_with_enforce::cast_with_npe\nFormals: \nLocals: derived:class cast_with_enforce::Derived * base:class cast_with_enforce::Base \n DECLARE_LOCALS(&return,&derived,&base); [line 53]\n " color=yellow style=filled] - - - 34 -> 38 ; -33 [label="33: DeclStmt \n _fun_cast_with_enforce::Base_Base(&base:class cast_with_enforce::Base *) [line 46]\n " shape="box"] - - - 33 -> 32 ; -32 [label="32: DeclStmt \n n$10=_fun___cast(&base:class cast_with_enforce::Base *,sizeof(class cast_with_enforce::Derived ( sub )(cast)):void ) [line 47]\n *&derived:class cast_with_enforce::Derived *=n$10 [line 47]\n " shape="box"] - - - 32 -> 31 ; -31 [label="31: DeclStmt \n *&_tmp:class cast_with_enforce::Derived *&=&derived [line 48]\n " shape="box"] - - - 31 -> 27 ; - 31 -> 28 ; -30 [label="30: ConditinalStmt Branch \n _fun_cast_with_enforce::WrongParameterException_WrongParameterException(&0$?%__sil_tmpSIL_materialize_temp__n$7:class cast_with_enforce::WrongParameterException *,\"derived\":_Bool ,\"Base is not Derived\":char *) [line 48]\n _fun_cast_with_enforce::WrongParameterException_WrongParameterException(&0$?%__sil_tmp__temp_construct_n$6:class cast_with_enforce::WrongParameterException *,&0$?%__sil_tmpSIL_materialize_temp__n$7:class cast_with_enforce::WrongParameterException &) [line 48]\n _fun___infer_objc_cpp_throw(&0$?%__sil_tmp__temp_construct_n$6:class cast_with_enforce::WrongParameterException ) [line 48]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class cast_with_enforce::Derived *&=-1 [line 48]\n " shape="box"] - - - 30 -> 26 ; -29 [label="29: ConditinalStmt Branch \n n$5=*&_tmp:class cast_with_enforce::Derived *& [line 48]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class cast_with_enforce::Derived *&=n$5 [line 48]\n " shape="box"] - - - 29 -> 26 ; -28 [label="28: Prune (false branch) \n n$3=*&_tmp:class cast_with_enforce::Derived *& [line 48]\n n$4=*n$3:class cast_with_enforce::Derived * [line 48]\n PRUNE((n$4 == 0), false); [line 48]\n " shape="invhouse"] - - - 28 -> 30 ; -27 [label="27: Prune (true branch) \n n$3=*&_tmp:class cast_with_enforce::Derived *& [line 48]\n n$4=*n$3:class cast_with_enforce::Derived * [line 48]\n PRUNE((n$4 != 0), true); [line 48]\n " shape="invhouse"] - - - 27 -> 29 ; -26 [label="26: + \n " ] - - - 26 -> 25 ; -25 [label="25: Return Stmt \n n$0=*&derived:class cast_with_enforce::Derived * [line 49]\n n$1=*n$0.a:int [line 49]\n *&return:int =n$1 [line 49]\n " shape="box"] - - - 25 -> 24 ; -24 [label="24: Exit cast_with_enforce::cast_with_npe_avoided_by_enforce \n " color=yellow style=filled] - - -23 [label="23: Start cast_with_enforce::cast_with_npe_avoided_by_enforce\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:class cast_with_enforce::Derived *& 0$?%__sil_tmp__temp_construct_n$6:class cast_with_enforce::WrongParameterException 0$?%__sil_tmpSIL_materialize_temp__n$7:class cast_with_enforce::WrongParameterException _tmp:class cast_with_enforce::Derived *& derived:class cast_with_enforce::Derived * base:class cast_with_enforce::Base \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmp__temp_construct_n$6,&0$?%__sil_tmpSIL_materialize_temp__n$7,&_tmp,&derived,&base); [line 45]\n " color=yellow style=filled] - - - 23 -> 33 ; -22 [label="22: DeclStmt \n n$10=*&certificate:class cast_with_enforce::Base & [line 40]\n n$11=_fun___cast(n$10:class cast_with_enforce::Base *,sizeof(class cast_with_enforce::Derived ( sub )(cast)):void ) [line 40]\n *&cert:class cast_with_enforce::Derived *=n$11 [line 40]\n " shape="box"] - - - 22 -> 21 ; -21 [label="21: DeclStmt \n *&_tmp:class cast_with_enforce::Derived *&=&cert [line 41]\n " shape="box"] - - - 21 -> 17 ; - 21 -> 18 ; -20 [label="20: ConditinalStmt Branch \n _fun_cast_with_enforce::WrongParameterException_WrongParameterException(&0$?%__sil_tmpSIL_materialize_temp__n$7:class cast_with_enforce::WrongParameterException *,\"cert\":_Bool ,\"Base is not Derived\":char *) [line 41]\n _fun_cast_with_enforce::WrongParameterException_WrongParameterException(&0$?%__sil_tmp__temp_construct_n$6:class cast_with_enforce::WrongParameterException *,&0$?%__sil_tmpSIL_materialize_temp__n$7:class cast_with_enforce::WrongParameterException &) [line 41]\n _fun___infer_objc_cpp_throw(&0$?%__sil_tmp__temp_construct_n$6:class cast_with_enforce::WrongParameterException ) [line 41]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class cast_with_enforce::Derived *&=-1 [line 41]\n " shape="box"] - - - 20 -> 16 ; -19 [label="19: ConditinalStmt Branch \n n$5=*&_tmp:class cast_with_enforce::Derived *& [line 41]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class cast_with_enforce::Derived *&=n$5 [line 41]\n " shape="box"] - - - 19 -> 16 ; -18 [label="18: Prune (false branch) \n n$3=*&_tmp:class cast_with_enforce::Derived *& [line 41]\n n$4=*n$3:class cast_with_enforce::Derived * [line 41]\n PRUNE((n$4 == 0), false); [line 41]\n " shape="invhouse"] - - - 18 -> 20 ; -17 [label="17: Prune (true branch) \n n$3=*&_tmp:class cast_with_enforce::Derived *& [line 41]\n n$4=*n$3:class cast_with_enforce::Derived * [line 41]\n PRUNE((n$4 != 0), true); [line 41]\n " shape="invhouse"] - - - 17 -> 19 ; -16 [label="16: + \n " ] - - - 16 -> 15 ; -15 [label="15: Return Stmt \n n$0=*&cert:class cast_with_enforce::Derived * [line 42]\n n$1=*n$0.a:int [line 42]\n *&return:int =n$1 [line 42]\n " shape="box"] - - - 15 -> 14 ; -14 [label="14: Exit cast_with_enforce::cast_with_no_npe \n " color=yellow style=filled] - - -13 [label="13: Start cast_with_enforce::cast_with_no_npe\nFormals: certificate:class cast_with_enforce::Base &\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:class cast_with_enforce::Derived *& 0$?%__sil_tmp__temp_construct_n$6:class cast_with_enforce::WrongParameterException 0$?%__sil_tmpSIL_materialize_temp__n$7:class cast_with_enforce::WrongParameterException _tmp:class cast_with_enforce::Derived *& cert:class cast_with_enforce::Derived * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmp__temp_construct_n$6,&0$?%__sil_tmpSIL_materialize_temp__n$7,&_tmp,&cert); [line 39]\n " color=yellow style=filled] - - - 13 -> 22 ; -12 [label="12: Exit cast_with_enforce::Base_Base \n " color=yellow style=filled] - - -11 [label="11: Start cast_with_enforce::Base_Base\nFormals: this:class cast_with_enforce::Base *\nLocals: \n DECLARE_LOCALS(&return); [line 28]\n " color=yellow style=filled] - - - 11 -> 12 ; -10 [label="10: Exit cast_with_enforce::Base_dummy \n " color=yellow style=filled] - - -9 [label="9: Start cast_with_enforce::Base_dummy\nFormals: this:class cast_with_enforce::Base *\nLocals: \n DECLARE_LOCALS(&return); [line 29]\n " color=yellow style=filled] - - - 9 -> 10 ; -8 [label="8: Exit cast_with_enforce::WrongParameterException_~WrongParameterException \n " color=yellow style=filled] - - -7 [label="7: Start cast_with_enforce::WrongParameterException_~WrongParameterException\nFormals: this:class cast_with_enforce::WrongParameterException *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] - - - 7 -> 8 ; -6 [label="6: Constructor Init \n n$0=*&this:class cast_with_enforce::WrongParameterException * [line 14]\n n$1=*&__param_0:class cast_with_enforce::WrongParameterException & [line 14]\n _fun_std::runtime_error_runtime_error(n$0:class cast_with_enforce::WrongParameterException *,n$1:class std::runtime_error &) [line 14]\n " shape="box"] - - - 6 -> 5 ; -5 [label="5: Exit cast_with_enforce::WrongParameterException_WrongParameterException \n " color=yellow style=filled] - - -4 [label="4: Start cast_with_enforce::WrongParameterException_WrongParameterException\nFormals: this:class cast_with_enforce::WrongParameterException * __param_0:class cast_with_enforce::WrongParameterException &\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] - - - 4 -> 6 ; -3 [label="3: Constructor Init \n n$0=*&this:class cast_with_enforce::WrongParameterException * [line 16]\n n$1=*&msg:char * [line 16]\n _fun_std::runtime_error_runtime_error(n$0:class cast_with_enforce::WrongParameterException *,n$1:char *) [line 16]\n " shape="box"] - - - 3 -> 2 ; -2 [label="2: Exit cast_with_enforce::WrongParameterException_WrongParameterException \n " color=yellow style=filled] - - -1 [label="1: Start cast_with_enforce::WrongParameterException_WrongParameterException\nFormals: this:class cast_with_enforce::WrongParameterException * e:_Bool msg:char *\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] - - - 1 -> 3 ; -} diff --git a/infer/tests/codetoanalyze/cpp/errors/templates/class_template_instantiate.cpp b/infer/tests/codetoanalyze/cpp/errors/templates/class_template_instantiate.cpp deleted file mode 120000 index a99a05f7e..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/templates/class_template_instantiate.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/templates/class_template_instantiate.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/templates/function.cpp b/infer/tests/codetoanalyze/cpp/errors/templates/function.cpp deleted file mode 120000 index f5d3d2f66..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/templates/function.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/templates/function.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/templates/function_pack.cpp b/infer/tests/codetoanalyze/cpp/errors/templates/function_pack.cpp deleted file mode 120000 index 36126b6c9..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/templates/function_pack.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/templates/function_pack.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/templates/method.cpp b/infer/tests/codetoanalyze/cpp/errors/templates/method.cpp deleted file mode 120000 index 585b36f4d..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/templates/method.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/templates/method.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/types/inheritance_field.cpp b/infer/tests/codetoanalyze/cpp/errors/types/inheritance_field.cpp deleted file mode 120000 index 5b286f1c4..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/types/inheritance_field.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/types/inheritance_field.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/types/operator_overload.cpp b/infer/tests/codetoanalyze/cpp/errors/types/operator_overload.cpp deleted file mode 120000 index feddc6bac..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/types/operator_overload.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/types/operator_overload.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/types/return_struct.cpp b/infer/tests/codetoanalyze/cpp/errors/types/return_struct.cpp deleted file mode 120000 index 9d47e5286..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/types/return_struct.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/types/return_struct.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/types/struct_forward_declare.cpp b/infer/tests/codetoanalyze/cpp/errors/types/struct_forward_declare.cpp deleted file mode 120000 index 53cf2183b..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/types/struct_forward_declare.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/types/struct_forward_declare.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/types/struct_pass_by_value.cpp b/infer/tests/codetoanalyze/cpp/errors/types/struct_pass_by_value.cpp deleted file mode 120000 index af024f199..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/types/struct_pass_by_value.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/types/struct_pass_by_value.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/errors/types/typeid_expr.cpp b/infer/tests/codetoanalyze/cpp/errors/types/typeid_expr.cpp deleted file mode 120000 index 4f7b5cfe8..000000000 --- a/infer/tests/codetoanalyze/cpp/errors/types/typeid_expr.cpp +++ /dev/null @@ -1 +0,0 @@ -../../frontend/types/typeid_expr.cpp \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/frontend/Makefile b/infer/tests/codetoanalyze/cpp/frontend/Makefile index d5b480556..27fa81d1b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/Makefile +++ b/infer/tests/codetoanalyze/cpp/frontend/Makefile @@ -10,7 +10,7 @@ include ../../Makefile.frontend OPTIONS = -x c++ -std=c++11 -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c FILES = \ - */*.cpp \ + */*.cpp shared/*/*.cpp \ compile: clang $(OPTIONS) $(FILES) diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot deleted file mode 100644 index 4721b4501..000000000 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot +++ /dev/null @@ -1,134 +0,0 @@ -/* @generated */ -digraph iCFG { -34 [label="34: DeclStmt \n _fun_X_X(&a:class X *) [line 26]\n " shape="box"] - - - 34 -> 28 ; -33 [label="33: DeclStmt \n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$1:class X [line 27]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:class X =n$7 [line 27]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$0:class X &) [line 27]\n " shape="box"] - - - 33 -> 26 ; -32 [label="32: ConditinalStmt Branch \n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&a:class X &) [line 27]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 27]\n " shape="box"] - - - 32 -> 27 ; -31 [label="31: ConditinalStmt Branch \n _fun_getX(&0$?%__sil_tmpSIL_materialize_temp__n$5:class X *) [line 27]\n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$5:class X &) [line 27]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 27]\n " shape="box"] - - - 31 -> 27 ; -30 [label="30: Prune (false branch) \n PRUNE((n$4 == 0), false); [line 27]\n " shape="invhouse"] - - - 30 -> 32 ; -29 [label="29: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 27]\n " shape="invhouse"] - - - 29 -> 31 ; -28 [label="28: Call _fun_X_operator_bool \n _fun_getX(&0$?%__sil_tmp__temp_return_n$3:class X *) [line 27]\n n$4=_fun_X_operator_bool(&0$?%__sil_tmp__temp_return_n$3:class X &) [line 27]\n " shape="box"] - - - 28 -> 29 ; - 28 -> 30 ; -27 [label="27: + \n " ] - - - 27 -> 33 ; -26 [label="26: Exit conditional \n " color=yellow style=filled] - - -25 [label="25: Start conditional\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$0:class X 0$?%__sil_tmpSIL_temp_conditional___n$1:class X 0$?%__sil_tmp__temp_return_n$3:class X 0$?%__sil_tmpSIL_materialize_temp__n$5:class X a:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmp__temp_return_n$3,&0$?%__sil_tmpSIL_materialize_temp__n$5,&a); [line 25]\n " color=yellow style=filled] - - - 25 -> 34 ; -24 [label="24: DeclStmt \n _fun_X_X(&a:class X *) [line 21]\n " shape="box"] - - - 24 -> 22 ; -23 [label="23: DeclStmt \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$2:class X [line 22]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:class X =n$5 [line 22]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$0:class X &) [line 22]\n " shape="box"] - - - 23 -> 15 ; -22 [label="22: BinaryConditinalStmt Init \n _fun_getX(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *) [line 22]\n " shape="box"] - - - 22 -> 17 ; -21 [label="21: ConditinalStmt Branch \n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&a:class X &) [line 22]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 22]\n " shape="box"] - - - 21 -> 16 ; -20 [label="20: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_materialize_temp__n$4:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 22]\n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$4:class X &) [line 22]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 22]\n " shape="box"] - - - 20 -> 16 ; -19 [label="19: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 22]\n " shape="invhouse"] - - - 19 -> 21 ; -18 [label="18: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 22]\n " shape="invhouse"] - - - 18 -> 20 ; -17 [label="17: Call _fun_X_operator_bool \n n$3=_fun_X_operator_bool(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X &) [line 22]\n " shape="box"] - - - 17 -> 18 ; - 17 -> 19 ; -16 [label="16: + \n " ] - - - 16 -> 23 ; -15 [label="15: Exit binaryConditional \n " color=yellow style=filled] - - -14 [label="14: Start binaryConditional\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$0:class X 0$?%__sil_tmpSIL_temp_conditional___n$2:class X 0$?%__sil_tmpSIL_materialize_temp__n$4:class X a:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&a); [line 20]\n " color=yellow style=filled] - - - 14 -> 24 ; -13 [label="13: DeclStmt \n _fun_X_X(&x:class X *) [line 15]\n " shape="box"] - - - 13 -> 12 ; -12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 16]\n _fun_X_X(n$0:class X *,&x:class X &) [line 16]\n " shape="box"] - - - 12 -> 11 ; -11 [label="11: Exit getX \n " color=yellow style=filled] - - -10 [label="10: Start getX\nFormals: __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 14]\n " color=yellow style=filled] - - - 10 -> 13 ; -9 [label="9: Exit X_X \n " color=yellow style=filled] - - -8 [label="8: Start X_X\nFormals: this:class X * __param_0:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - - - 8 -> 9 ; -7 [label="7: Exit X_X \n " color=yellow style=filled] - - -6 [label="6: Start X_X\nFormals: this:class X * __param_0:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - - - 6 -> 7 ; -5 [label="5: Exit X_X \n " color=yellow style=filled] - - -4 [label="4: Start X_X\nFormals: this:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - - - 4 -> 5 ; -3 [label="3: Return Stmt \n *&return:_Bool =1 [line 11]\n " shape="box"] - - - 3 -> 2 ; -2 [label="2: Exit X_operator_bool \n " color=yellow style=filled] - - -1 [label="1: Start X_operator_bool\nFormals: this:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] - - - 1 -> 3 ; -} diff --git a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_no_templ.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/include_header/include_no_templ.cpp.dot deleted file mode 100644 index 7a3dad2e2..000000000 --- a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_no_templ.cpp.dot +++ /dev/null @@ -1,46 +0,0 @@ -digraph iCFG { -12 [label="12: DeclStmt \n _fun_A_A(&a:class A *) [line 13]\n " shape="box"] - - - 12 -> 11 ; -11 [label="11: Return Stmt \n n$0=_fun_A_get0(&a:class A &) [line 14]\n *&return:int =(1 / n$0) [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&a,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] - - - 11 -> 10 ; -10 [label="10: Exit div0_a \n " color=yellow style=filled] - - -9 [label="9: Start div0_a\nFormals: \nLocals: a:class A \n DECLARE_LOCALS(&return,&a); [line 12]\n " color=yellow style=filled] - - - 9 -> 12 ; -8 [label="8: Return Stmt \n *&return:int =(1 / 0) [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] - - - 8 -> 7 ; -7 [label="7: Exit div0_fun \n " color=yellow style=filled] - - -6 [label="6: Start div0_fun\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] - - - 6 -> 8 ; -5 [label="5: Exit A_A \n " color=yellow style=filled] - - -4 [label="4: Start A_A\nFormals: this:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n NULLIFY(&this,false); [line 10]\n " color=yellow style=filled] - - - 4 -> 5 ; -3 [label="3: Return Stmt \n *&return:int =0 [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] - - - 3 -> 2 ; -2 [label="2: Exit A_get0 \n " color=yellow style=filled] - - -1 [label="1: Start A_get0\nFormals: this:class A *\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n NULLIFY(&this,false); [line 11]\n " color=yellow style=filled] - - - 1 -> 3 ; -} diff --git a/infer/tests/codetoanalyze/cpp/frontend/lambda/lambda1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/lambda/lambda1.cpp.dot deleted file mode 100644 index d7981851d..000000000 --- a/infer/tests/codetoanalyze/cpp/frontend/lambda/lambda1.cpp.dot +++ /dev/null @@ -1,128 +0,0 @@ -/* @generated */ -digraph iCFG { -34 [label="34: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_lambda_lambda1.cpp:26:12 =(_fun_fooOK::lambda_lambda_lambda1.cpp:26:12_operator()) [line 26]\n _fun_fooOK::lambda_lambda_lambda1.cpp:26:12_(&y:class fooOK::lambda_lambda_lambda1.cpp:26:12 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_lambda_lambda1.cpp:26:12 &) [line 26]\n " shape="box"] - - - 34 -> 31 ; -33 [label="33: Exit fooOK::lambda_lambda_lambda1.cpp:26:12_ \n " color=yellow style=filled] - - -32 [label="32: Start fooOK::lambda_lambda_lambda1.cpp:26:12_\nFormals: this:class fooOK::lambda_lambda_lambda1.cpp:26:12 * __param_0:class fooOK::lambda_lambda_lambda1.cpp:26:12 &\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] - - - 32 -> 33 ; -31 [label="31: Return Stmt \n n$0=_fun_fooOK::lambda_lambda_lambda1.cpp:26:12_operator()(&y:class fooOK::lambda_lambda_lambda1.cpp:26:12 &,3:int ) [line 27]\n *&return:int =(5 / (4 - n$0)) [line 27]\n " shape="box"] - - - 31 -> 27 ; -30 [label="30: Return Stmt \n n$0=*&i:int [line 26]\n *&i:int =(n$0 + 1) [line 26]\n *&return:int =n$0 [line 26]\n " shape="box"] - - - 30 -> 29 ; -29 [label="29: Exit fooOK::lambda_lambda_lambda1.cpp:26:12_operator() \n " color=yellow style=filled] - - -28 [label="28: Start fooOK::lambda_lambda_lambda1.cpp:26:12_operator()\nFormals: this:class fooOK::lambda_lambda_lambda1.cpp:26:12 * i:int \nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] - - - 28 -> 30 ; -27 [label="27: Exit fooOK \n " color=yellow style=filled] - - -26 [label="26: Start fooOK\nFormals: \nLocals: y:class fooOK::lambda_lambda_lambda1.cpp:26:12 0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_lambda_lambda1.cpp:26:12 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 24]\n " color=yellow style=filled] - - - 26 -> 34 ; -25 [label="25: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_lambda_lambda1.cpp:19:17 =(_fun_foo::lambda_lambda_lambda1.cpp:19:17_operator()) [line 19]\n _fun_foo::lambda_lambda_lambda1.cpp:19:17_(&unused:class foo::lambda_lambda_lambda1.cpp:19:17 *,&0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_lambda_lambda1.cpp:19:17 &) [line 19]\n " shape="box"] - - - 25 -> 19 ; -24 [label="24: Return Stmt \n *&return:int =(1 / 0) [line 19]\n " shape="box"] - - - 24 -> 23 ; -23 [label="23: Exit foo::lambda_lambda_lambda1.cpp:19:17_operator() \n " color=yellow style=filled] - - -22 [label="22: Start foo::lambda_lambda_lambda1.cpp:19:17_operator()\nFormals: this:class foo::lambda_lambda_lambda1.cpp:19:17 *\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] - - - 22 -> 24 ; -21 [label="21: Exit foo::lambda_lambda_lambda1.cpp:19:17_ \n " color=yellow style=filled] - - -20 [label="20: Start foo::lambda_lambda_lambda1.cpp:19:17_\nFormals: this:class foo::lambda_lambda_lambda1.cpp:19:17 * __param_0:class foo::lambda_lambda_lambda1.cpp:19:17 &\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] - - - 20 -> 21 ; -19 [label="19: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_lambda_lambda1.cpp:20:12 =(_fun_foo::lambda_lambda_lambda1.cpp:20:12_operator()) [line 20]\n _fun_foo::lambda_lambda_lambda1.cpp:20:12_(&y:class foo::lambda_lambda_lambda1.cpp:20:12 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_lambda_lambda1.cpp:20:12 &) [line 20]\n " shape="box"] - - - 19 -> 16 ; -18 [label="18: Exit foo::lambda_lambda_lambda1.cpp:20:12_ \n " color=yellow style=filled] - - -17 [label="17: Start foo::lambda_lambda_lambda1.cpp:20:12_\nFormals: this:class foo::lambda_lambda_lambda1.cpp:20:12 * __param_0:class foo::lambda_lambda_lambda1.cpp:20:12 &\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] - - - 17 -> 18 ; -16 [label="16: Return Stmt \n n$0=_fun_foo::lambda_lambda_lambda1.cpp:20:12_operator()(&y:class foo::lambda_lambda_lambda1.cpp:20:12 &,3:int ) [line 21]\n *&return:int =(5 / (4 - n$0)) [line 21]\n " shape="box"] - - - 16 -> 12 ; -15 [label="15: Return Stmt \n n$0=*&i:int [line 20]\n *&i:int =(n$0 + 1) [line 20]\n n$1=*&i:int [line 20]\n *&return:int =n$1 [line 20]\n " shape="box"] - - - 15 -> 14 ; -14 [label="14: Exit foo::lambda_lambda_lambda1.cpp:20:12_operator() \n " color=yellow style=filled] - - -13 [label="13: Start foo::lambda_lambda_lambda1.cpp:20:12_operator()\nFormals: this:class foo::lambda_lambda_lambda1.cpp:20:12 * i:int \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] - - - 13 -> 15 ; -12 [label="12: Exit foo \n " color=yellow style=filled] - - -11 [label="11: Start foo\nFormals: \nLocals: y:class foo::lambda_lambda_lambda1.cpp:20:12 0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_lambda_lambda1.cpp:20:12 unused:class foo::lambda_lambda_lambda1.cpp:19:17 0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_lambda_lambda1.cpp:19:17 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1,&unused,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 18]\n " color=yellow style=filled] - - - 11 -> 25 ; -10 [label="10: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_lambda_lambda1.cpp:11:15 =(_fun_bar::lambda_lambda_lambda1.cpp:11:15_operator()) [line 11]\n _fun_bar::lambda_lambda_lambda1.cpp:11:15_(&func:class bar::lambda_lambda_lambda1.cpp:11:15 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_lambda_lambda1.cpp:11:15 &) [line 11]\n " shape="box"] - - - 10 -> 7 ; -9 [label="9: Exit bar::lambda_lambda_lambda1.cpp:11:15_ \n " color=yellow style=filled] - - -8 [label="8: Start bar::lambda_lambda_lambda1.cpp:11:15_\nFormals: this:class bar::lambda_lambda_lambda1.cpp:11:15 * __param_0:class bar::lambda_lambda_lambda1.cpp:11:15 &\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] - - - 8 -> 9 ; -7 [label="7: Return Stmt \n n$0=_fun_bar::lambda_lambda_lambda1.cpp:11:15_operator()(&func:class bar::lambda_lambda_lambda1.cpp:11:15 &) [line 15]\n *&return:int =(7 / n$0) [line 15]\n " shape="box"] - - - 7 -> 2 ; -6 [label="6: DeclStmt \n *&i:int =0 [line 12]\n " shape="box"] - - - 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&i:int [line 13]\n *&return:int =n$0 [line 13]\n " shape="box"] - - - 5 -> 4 ; -4 [label="4: Exit bar::lambda_lambda_lambda1.cpp:11:15_operator() \n " color=yellow style=filled] - - -3 [label="3: Start bar::lambda_lambda_lambda1.cpp:11:15_operator()\nFormals: this:class bar::lambda_lambda_lambda1.cpp:11:15 *\nLocals: i:int \n DECLARE_LOCALS(&return,&i); [line 11]\n " color=yellow style=filled] - - - 3 -> 6 ; -2 [label="2: Exit bar \n " color=yellow style=filled] - - -1 [label="1: Start bar\nFormals: \nLocals: func:class bar::lambda_lambda_lambda1.cpp:11:15 0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_lambda_lambda1.cpp:11:15 \n DECLARE_LOCALS(&return,&func,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 10]\n " color=yellow style=filled] - - - 1 -> 10 ; -} diff --git a/infer/tests/codetoanalyze/cpp/frontend/shared b/infer/tests/codetoanalyze/cpp/frontend/shared new file mode 120000 index 000000000..ac3565167 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/frontend/shared @@ -0,0 +1 @@ +../shared/ \ No newline at end of file diff --git a/infer/tests/codetoanalyze/cpp/frontend/attributes/deprecated_hack.cpp b/infer/tests/codetoanalyze/cpp/shared/attributes/deprecated_hack.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/attributes/deprecated_hack.cpp rename to infer/tests/codetoanalyze/cpp/shared/attributes/deprecated_hack.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/attributes/deprecated_hack.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/attributes/deprecated_hack.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/attributes/deprecated_hack.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/attributes/deprecated_hack.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp similarity index 94% rename from infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp rename to infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp index 7581f706c..0471cc0d3 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp +++ b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp @@ -7,6 +7,8 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +namespace binary_conditional { + struct X { operator bool() { return true; } }; @@ -26,3 +28,4 @@ void conditional() { X a; X x = getX() ? getX() : a; } +} diff --git a/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot new file mode 100644 index 000000000..a047a9a48 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot @@ -0,0 +1,134 @@ +/* @generated */ +digraph iCFG { +34 [label="34: DeclStmt \n _fun_binary_conditional::X_X(&a:class binary_conditional::X *) [line 28]\n " shape="box"] + + + 34 -> 28 ; +33 [label="33: DeclStmt \n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$1:class binary_conditional::X [line 29]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X =n$7 [line 29]\n _fun_binary_conditional::X_X(&x:class binary_conditional::X *,&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X &) [line 29]\n " shape="box"] + + + 33 -> 26 ; +32 [label="32: ConditinalStmt Branch \n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X *,&a:class binary_conditional::X &) [line 29]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:class binary_conditional::X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 29]\n " shape="box"] + + + 32 -> 27 ; +31 [label="31: ConditinalStmt Branch \n _fun_binary_conditional::getX(&0$?%__sil_tmpSIL_materialize_temp__n$5:class binary_conditional::X *) [line 29]\n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X *,&0$?%__sil_tmpSIL_materialize_temp__n$5:class binary_conditional::X &) [line 29]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:class binary_conditional::X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 29]\n " shape="box"] + + + 31 -> 27 ; +30 [label="30: Prune (false branch) \n PRUNE((n$4 == 0), false); [line 29]\n " shape="invhouse"] + + + 30 -> 32 ; +29 [label="29: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 29]\n " shape="invhouse"] + + + 29 -> 31 ; +28 [label="28: Call _fun_binary_conditional::X_operator_bool \n _fun_binary_conditional::getX(&0$?%__sil_tmp__temp_return_n$3:class binary_conditional::X *) [line 29]\n n$4=_fun_binary_conditional::X_operator_bool(&0$?%__sil_tmp__temp_return_n$3:class binary_conditional::X &) [line 29]\n " shape="box"] + + + 28 -> 29 ; + 28 -> 30 ; +27 [label="27: + \n " ] + + + 27 -> 33 ; +26 [label="26: Exit binary_conditional::conditional \n " color=yellow style=filled] + + +25 [label="25: Start binary_conditional::conditional\nFormals: \nLocals: x:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$1:class binary_conditional::X 0$?%__sil_tmp__temp_return_n$3:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$5:class binary_conditional::X a:class binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmp__temp_return_n$3,&0$?%__sil_tmpSIL_materialize_temp__n$5,&a); [line 27]\n " color=yellow style=filled] + + + 25 -> 34 ; +24 [label="24: DeclStmt \n _fun_binary_conditional::X_X(&a:class binary_conditional::X *) [line 23]\n " shape="box"] + + + 24 -> 22 ; +23 [label="23: DeclStmt \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$2:class binary_conditional::X [line 24]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X =n$5 [line 24]\n _fun_binary_conditional::X_X(&x:class binary_conditional::X *,&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X &) [line 24]\n " shape="box"] + + + 23 -> 15 ; +22 [label="22: BinaryConditinalStmt Init \n _fun_binary_conditional::getX(&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X *) [line 24]\n " shape="box"] + + + 22 -> 17 ; +21 [label="21: ConditinalStmt Branch \n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X *,&a:class binary_conditional::X &) [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class binary_conditional::X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 24]\n " shape="box"] + + + 21 -> 16 ; +20 [label="20: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_materialize_temp__n$4:class binary_conditional::X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 24]\n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X *,&0$?%__sil_tmpSIL_materialize_temp__n$4:class binary_conditional::X &) [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class binary_conditional::X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 24]\n " shape="box"] + + + 20 -> 16 ; +19 [label="19: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 24]\n " shape="invhouse"] + + + 19 -> 21 ; +18 [label="18: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 24]\n " shape="invhouse"] + + + 18 -> 20 ; +17 [label="17: Call _fun_binary_conditional::X_operator_bool \n n$3=_fun_binary_conditional::X_operator_bool(&0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X &) [line 24]\n " shape="box"] + + + 17 -> 18 ; + 17 -> 19 ; +16 [label="16: + \n " ] + + + 16 -> 23 ; +15 [label="15: Exit binary_conditional::binaryConditional \n " color=yellow style=filled] + + +14 [label="14: Start binary_conditional::binaryConditional\nFormals: \nLocals: x:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:class binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$2:class binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$4:class binary_conditional::X a:class binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&a); [line 22]\n " color=yellow style=filled] + + + 14 -> 24 ; +13 [label="13: DeclStmt \n _fun_binary_conditional::X_X(&x:class binary_conditional::X *) [line 17]\n " shape="box"] + + + 13 -> 12 ; +12 [label="12: Return Stmt \n n$0=*&__return_param:class binary_conditional::X * [line 18]\n _fun_binary_conditional::X_X(n$0:class binary_conditional::X *,&x:class binary_conditional::X &) [line 18]\n " shape="box"] + + + 12 -> 11 ; +11 [label="11: Exit binary_conditional::getX \n " color=yellow style=filled] + + +10 [label="10: Start binary_conditional::getX\nFormals: __return_param:class binary_conditional::X *\nLocals: x:class binary_conditional::X \n DECLARE_LOCALS(&return,&x); [line 16]\n " color=yellow style=filled] + + + 10 -> 13 ; +9 [label="9: Exit binary_conditional::X_X \n " color=yellow style=filled] + + +8 [label="8: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X * __param_0:class binary_conditional::X &\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] + + + 8 -> 9 ; +7 [label="7: Exit binary_conditional::X_X \n " color=yellow style=filled] + + +6 [label="6: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X * __param_0:class binary_conditional::X &\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] + + + 6 -> 7 ; +5 [label="5: Exit binary_conditional::X_X \n " color=yellow style=filled] + + +4 [label="4: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X *\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] + + + 4 -> 5 ; +3 [label="3: Return Stmt \n *&return:_Bool =1 [line 13]\n " shape="box"] + + + 3 -> 2 ; +2 [label="2: Exit binary_conditional::X_operator_bool \n " color=yellow style=filled] + + +1 [label="1: Start binary_conditional::X_operator_bool\nFormals: this:class binary_conditional::X *\nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] + + + 1 -> 3 ; +} diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp b/infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp rename to infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/conditional/lvalue_conditional.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_default_arg.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_default_arg.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_default_arg.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_default_arg.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_new.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/default_field_init.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/default_field_init.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/default_field_init.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/default_field_init.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp b/infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp rename to infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp b/infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp rename to infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/exceptions/Exceptions.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/exceptions/noexception.cpp b/infer/tests/codetoanalyze/cpp/shared/exceptions/noexception.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/exceptions/noexception.cpp rename to infer/tests/codetoanalyze/cpp/shared/exceptions/noexception.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/exceptions/noexception.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/exceptions/noexception.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/exceptions/noexception.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/exceptions/noexception.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/lambda/lambda1.cpp b/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/lambda/lambda1.cpp rename to infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp diff --git a/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot new file mode 100644 index 000000000..6bd75263b --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot @@ -0,0 +1,128 @@ +/* @generated */ +digraph iCFG { +34 [label="34: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 =(_fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()) [line 26]\n _fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_(&y:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 &) [line 26]\n " shape="box"] + + + 34 -> 31 ; +33 [label="33: Exit fooOK::lambda_shared_lambda_lambda1.cpp:26:12_ \n " color=yellow style=filled] + + +32 [label="32: Start fooOK::lambda_shared_lambda_lambda1.cpp:26:12_\nFormals: this:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 * __param_0:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 &\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] + + + 32 -> 33 ; +31 [label="31: Return Stmt \n n$0=_fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()(&y:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 &,3:int ) [line 27]\n *&return:int =(5 / (4 - n$0)) [line 27]\n " shape="box"] + + + 31 -> 27 ; +30 [label="30: Return Stmt \n n$0=*&i:int [line 26]\n *&i:int =(n$0 + 1) [line 26]\n *&return:int =n$0 [line 26]\n " shape="box"] + + + 30 -> 29 ; +29 [label="29: Exit fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator() \n " color=yellow style=filled] + + +28 [label="28: Start fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()\nFormals: this:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 * i:int \nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] + + + 28 -> 30 ; +27 [label="27: Exit fooOK \n " color=yellow style=filled] + + +26 [label="26: Start fooOK\nFormals: \nLocals: y:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 0$?%__sil_tmpSIL_materialize_temp__n$1:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 24]\n " color=yellow style=filled] + + + 26 -> 34 ; +25 [label="25: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_shared_lambda_lambda1.cpp:19:17 =(_fun_foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()) [line 19]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:19:17_(&unused:class foo::lambda_shared_lambda_lambda1.cpp:19:17 *,&0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_shared_lambda_lambda1.cpp:19:17 &) [line 19]\n " shape="box"] + + + 25 -> 19 ; +24 [label="24: Return Stmt \n *&return:int =(1 / 0) [line 19]\n " shape="box"] + + + 24 -> 23 ; +23 [label="23: Exit foo::lambda_shared_lambda_lambda1.cpp:19:17_operator() \n " color=yellow style=filled] + + +22 [label="22: Start foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:19:17 *\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] + + + 22 -> 24 ; +21 [label="21: Exit foo::lambda_shared_lambda_lambda1.cpp:19:17_ \n " color=yellow style=filled] + + +20 [label="20: Start foo::lambda_shared_lambda_lambda1.cpp:19:17_\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:19:17 * __param_0:class foo::lambda_shared_lambda_lambda1.cpp:19:17 &\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] + + + 20 -> 21 ; +19 [label="19: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_shared_lambda_lambda1.cpp:20:12 =(_fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()) [line 20]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_(&y:class foo::lambda_shared_lambda_lambda1.cpp:20:12 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_shared_lambda_lambda1.cpp:20:12 &) [line 20]\n " shape="box"] + + + 19 -> 16 ; +18 [label="18: Exit foo::lambda_shared_lambda_lambda1.cpp:20:12_ \n " color=yellow style=filled] + + +17 [label="17: Start foo::lambda_shared_lambda_lambda1.cpp:20:12_\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:20:12 * __param_0:class foo::lambda_shared_lambda_lambda1.cpp:20:12 &\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] + + + 17 -> 18 ; +16 [label="16: Return Stmt \n n$0=_fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()(&y:class foo::lambda_shared_lambda_lambda1.cpp:20:12 &,3:int ) [line 21]\n *&return:int =(5 / (4 - n$0)) [line 21]\n " shape="box"] + + + 16 -> 12 ; +15 [label="15: Return Stmt \n n$0=*&i:int [line 20]\n *&i:int =(n$0 + 1) [line 20]\n n$1=*&i:int [line 20]\n *&return:int =n$1 [line 20]\n " shape="box"] + + + 15 -> 14 ; +14 [label="14: Exit foo::lambda_shared_lambda_lambda1.cpp:20:12_operator() \n " color=yellow style=filled] + + +13 [label="13: Start foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:20:12 * i:int \nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] + + + 13 -> 15 ; +12 [label="12: Exit foo \n " color=yellow style=filled] + + +11 [label="11: Start foo\nFormals: \nLocals: y:class foo::lambda_shared_lambda_lambda1.cpp:20:12 0$?%__sil_tmpSIL_materialize_temp__n$1:class foo::lambda_shared_lambda_lambda1.cpp:20:12 unused:class foo::lambda_shared_lambda_lambda1.cpp:19:17 0$?%__sil_tmpSIL_materialize_temp__n$2:class foo::lambda_shared_lambda_lambda1.cpp:19:17 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1,&unused,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 18]\n " color=yellow style=filled] + + + 11 -> 25 ; +10 [label="10: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_shared_lambda_lambda1.cpp:11:15 =(_fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()) [line 11]\n _fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_(&func:class bar::lambda_shared_lambda_lambda1.cpp:11:15 *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_shared_lambda_lambda1.cpp:11:15 &) [line 11]\n " shape="box"] + + + 10 -> 7 ; +9 [label="9: Exit bar::lambda_shared_lambda_lambda1.cpp:11:15_ \n " color=yellow style=filled] + + +8 [label="8: Start bar::lambda_shared_lambda_lambda1.cpp:11:15_\nFormals: this:class bar::lambda_shared_lambda_lambda1.cpp:11:15 * __param_0:class bar::lambda_shared_lambda_lambda1.cpp:11:15 &\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] + + + 8 -> 9 ; +7 [label="7: Return Stmt \n n$0=_fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()(&func:class bar::lambda_shared_lambda_lambda1.cpp:11:15 &) [line 15]\n *&return:int =(7 / n$0) [line 15]\n " shape="box"] + + + 7 -> 2 ; +6 [label="6: DeclStmt \n *&i:int =0 [line 12]\n " shape="box"] + + + 6 -> 5 ; +5 [label="5: Return Stmt \n n$0=*&i:int [line 13]\n *&return:int =n$0 [line 13]\n " shape="box"] + + + 5 -> 4 ; +4 [label="4: Exit bar::lambda_shared_lambda_lambda1.cpp:11:15_operator() \n " color=yellow style=filled] + + +3 [label="3: Start bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()\nFormals: this:class bar::lambda_shared_lambda_lambda1.cpp:11:15 *\nLocals: i:int \n DECLARE_LOCALS(&return,&i); [line 11]\n " color=yellow style=filled] + + + 3 -> 6 ; +2 [label="2: Exit bar \n " color=yellow style=filled] + + +1 [label="1: Start bar\nFormals: \nLocals: func:class bar::lambda_shared_lambda_lambda1.cpp:11:15 0$?%__sil_tmpSIL_materialize_temp__n$1:class bar::lambda_shared_lambda_lambda1.cpp:11:15 \n DECLARE_LOCALS(&return,&func,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 10]\n " color=yellow style=filled] + + + 1 -> 10 ; +} diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/default_parameters.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/default_parameters.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/default_parameters.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/default_parameters.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/dereference_this.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/dereference_this.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/dereference_this.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/dereference_this.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/inline_method.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/inline_method.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/inline_method.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/inline_method.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/overloading.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/overloading.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/overloading.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/overloading.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/static.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/static.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/static.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/static.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp b/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp rename to infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/function.cpp b/infer/tests/codetoanalyze/cpp/shared/namespace/function.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/namespace/function.cpp rename to infer/tests/codetoanalyze/cpp/shared/namespace/function.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/function.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/namespace/function.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/namespace/function.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/namespace/function.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/global_variable.cpp b/infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/namespace/global_variable.cpp rename to infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/global_variable.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/namespace/global_variable.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp b/infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp rename to infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_for.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_for.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_for.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_for.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_if.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_if.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_if.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_if.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_switch.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_switch.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_switch.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_switch.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_while.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_while.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_while.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_while.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp b/infer/tests/codetoanalyze/cpp/shared/npe/method_call.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp rename to infer/tests/codetoanalyze/cpp/shared/npe/method_call.cpp diff --git a/infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/npe/method_call.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/npe/method_call.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/box.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/box.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/box.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/box.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/increment.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/increment.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/increment.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/increment.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/init.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/init.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/init.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/init.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/member_access.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/member_access.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/member_access.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/member_access.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/nested_assignment.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/nested_assignment.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/nested_assignment.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/nested_assignment.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/reference_type_e2e.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/reference_type_e2e.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/reference_type_e2e.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/reference_type_e2e.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/temporary_lvalue.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/temporary_lvalue.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/temporary_lvalue.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/temporary_lvalue.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp b/infer/tests/codetoanalyze/cpp/shared/reference/unbox.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp rename to infer/tests/codetoanalyze/cpp/shared/reference/unbox.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/unbox.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/reference/unbox.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp b/infer/tests/codetoanalyze/cpp/shared/templates/class_template_instantiate.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp rename to infer/tests/codetoanalyze/cpp/shared/templates/class_template_instantiate.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/class_template_instantiate.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/templates/class_template_instantiate.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp b/infer/tests/codetoanalyze/cpp/shared/templates/function.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp rename to infer/tests/codetoanalyze/cpp/shared/templates/function.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/function.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/templates/function.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/function_pack.cpp b/infer/tests/codetoanalyze/cpp/shared/templates/function_pack.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/function_pack.cpp rename to infer/tests/codetoanalyze/cpp/shared/templates/function_pack.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/function_pack.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/function_pack.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/function_pack.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/templates/function_pack.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp b/infer/tests/codetoanalyze/cpp/shared/templates/method.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp rename to infer/tests/codetoanalyze/cpp/shared/templates/method.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/method.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/templates/method.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp b/infer/tests/codetoanalyze/cpp/shared/templates/simple.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp rename to infer/tests/codetoanalyze/cpp/shared/templates/simple.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/simple.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/templates/simple.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp b/infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp rename to infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp b/infer/tests/codetoanalyze/cpp/shared/types/casts.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/casts.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/casts.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/casts.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp b/infer/tests/codetoanalyze/cpp/shared/types/functions.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/functions.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/functions.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/functions.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp b/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp b/infer/tests/codetoanalyze/cpp/shared/types/operator_overload.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/operator_overload.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/operator_overload.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/operator_overload.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp b/infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp b/infer/tests/codetoanalyze/cpp/shared/types/struct.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/struct.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/struct.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/struct.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp b/infer/tests/codetoanalyze/cpp/shared/types/struct_forward_declare.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/struct_forward_declare.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/struct_forward_declare.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/struct_forward_declare.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp b/infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/type_trait_expr.cpp b/infer/tests/codetoanalyze/cpp/shared/types/type_trait_expr.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/type_trait_expr.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/type_trait_expr.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/type_trait_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/type_trait_expr.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/type_trait_expr.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/type_trait_expr.cpp.dot diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp b/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp rename to infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot rename to infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot diff --git a/infer/tests/codetoanalyze/objc/errors/Makefile b/infer/tests/codetoanalyze/objc/errors/Makefile index 445aebd01..7da08178f 100644 --- a/infer/tests/codetoanalyze/objc/errors/Makefile +++ b/infer/tests/codetoanalyze/objc/errors/Makefile @@ -17,66 +17,64 @@ OPTIONS = -x objective-c \ FILES = \ - category_procdesc/EOCPerson.m \ field_superclass/B.m \ - frontend/dispatch.m \ - frontend/GetterExample.m \ - frontend/block-it.m \ - frontend/PropertyAttributes.m \ - memory_leaks_benchmark/ArcExample.m \ - memory_leaks_benchmark/AutoreleaseExample.m \ memory_leaks_benchmark/FBViewExample.m \ - memory_leaks_benchmark/MemoryLeakExample.m \ memory_leaks_benchmark/MemoryLeakRaii.m \ memory_leaks_benchmark/NSMakeCollectableExample.m \ memory_leaks_benchmark/NSStringInitWithBytesNoCopyExample.m \ - memory_leaks_benchmark/RetainReleaseExample.m \ memory_leaks_benchmark/RetainReleaseExampleBucketing.m \ - memory_leaks_benchmark/arc_methods.m \ npe/Fraction.m \ npe/NPD_core_foundation.m \ - npe/Nonnull_attribute_example.m \ npe/Npe_with_equal_names.m \ npe/block.m \ npe/skip_method_with_nil_object.m \ procdescs/MethodCall.m \ property/main.c \ - protocol_procdesc/Bicycle.m \ - protocol_procdesc/main.c \ resource_leaks/ResourceLeakExample.m \ + shared/block/block-it.m \ + shared/block/dispatch.m \ + shared/category_procdesc/EOCPerson.m \ + shared/memory_leaks_benchmark/ArcExample.m \ + shared/memory_leaks_benchmark/AutoreleaseExample.m \ + shared/memory_leaks_benchmark/MemoryLeakExample.m \ + shared/memory_leaks_benchmark/RetainReleaseExample.m \ + shared/memory_leaks_benchmark/arc_methods.m \ + shared/npe/Nonnull_attribute_example.m \ + shared/property/GetterExample.m \ + shared/property/PropertyAttributes.m \ + shared/protocol_procdesc/Bicycle.m \ + shared/protocol_procdesc/main.c \ taint/sources.m \ taint/viewController.m \ FILES_BUCKET_ALL = \ - frontend/BlockVar.m \ - frontend/NSAssert_example.m \ - frontend/block.m \ - frontend/block_no_args.m \ - frontend/block_release.m \ - frontend/compound_literal.c \ - frontend/dispatch_in_macro.m \ - category_procdesc/main.c \ - field_superclass/SuperExample.m \ field_superclass/field.c \ global_const/global_const.m \ + initialization/compound_literal.c \ memory_leaks_benchmark/CADisplayLinkRetainCycle.m \ memory_leaks_benchmark/RetainCycleStaticVar.m \ - memory_leaks_benchmark/RetainReleaseExample2.m \ npe/blockenum.m \ npe/nil_param.m \ - npe/npe_malloc.m \ npe/null_returned_by_method.m \ procdescs/main.c \ property/main.c \ returnstmt/return_npe_test.m \ + shared/assertions/NSAssert_example.m \ + shared/block/BlockVar.m \ + shared/block/block.m \ + shared/block/block_no_args.m \ + shared/block/block_release.m \ + shared/block/dispatch_in_macro.m \ + shared/category_procdesc/main.c \ + shared/field_superclass/SuperExample.m \ + shared/memory_leaks_benchmark/RetainReleaseExample2.m \ + shared/npe/npe_malloc.m \ warnings/ParameterNotNullableExample.m \ FILES_ARC = \ field_superclass/SubtypingExample.m \ - frontend/dispatch_examples.m \ - frontend/struct_initlistexpr.c \ + initialization/struct_initlistexpr.c \ memory_leaks_benchmark/RetainReleaseExampleBucketingArc.m \ - memory_leaks_benchmark/TollBridgeExample.m \ memory_leaks_benchmark/retain_cycle.m \ memory_leaks_benchmark/retain_cycle2.m \ npe/BoxedNumberExample.m \ @@ -89,6 +87,8 @@ FILES_ARC = \ npe/npe_self.m \ npe/nullable.m \ property/ExplicitIvarName.m \ + shared/block/dispatch_examples.m \ + shared/memory_leaks_benchmark/TollBridgeExample.m \ subtyping/KindOfClassExample.m \ variadic_methods/premature_nil_termination.m \ diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.h b/infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.h deleted file mode 120000 index e33a18244..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.h +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/BlockVar.h \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.m b/infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.m deleted file mode 120000 index c20f38ed7..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/BlockVar.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/BlockVar.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.h b/infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.h deleted file mode 120000 index d7f73e359..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.h +++ /dev/null @@ -1 +0,0 @@ -../../frontend/property/GetterExample.h \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.m b/infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.m deleted file mode 120000 index 125cf66c8..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/GetterExample.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/property/GetterExample.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/NSAssert_example.m b/infer/tests/codetoanalyze/objc/errors/frontend/NSAssert_example.m deleted file mode 120000 index f2c1086f7..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/NSAssert_example.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/assertions/NSAssert_example.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/PropertyAttributes.m b/infer/tests/codetoanalyze/objc/errors/frontend/PropertyAttributes.m deleted file mode 120000 index f151d798d..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/PropertyAttributes.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/property/PropertyAttributes.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/block-it.m b/infer/tests/codetoanalyze/objc/errors/frontend/block-it.m deleted file mode 120000 index 843d3fa99..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/block-it.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/block-it.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/block.m b/infer/tests/codetoanalyze/objc/errors/frontend/block.m deleted file mode 120000 index 1de41f2a0..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/block.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/block.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/block_no_args.m b/infer/tests/codetoanalyze/objc/errors/frontend/block_no_args.m deleted file mode 120000 index 8b1ac559c..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/block_no_args.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/block_no_args.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/block_release.m b/infer/tests/codetoanalyze/objc/errors/frontend/block_release.m deleted file mode 120000 index c86702fd7..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/block_release.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/block_release.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/compound_literal.c b/infer/tests/codetoanalyze/objc/errors/frontend/compound_literal.c deleted file mode 120000 index 1f8dbb3ee..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/compound_literal.c +++ /dev/null @@ -1 +0,0 @@ -../../../c/frontend/initialization/compound_literal.c \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/dispatch.m b/infer/tests/codetoanalyze/objc/errors/frontend/dispatch.m deleted file mode 120000 index ad2c96bb7..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/dispatch.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/dispatch.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/dispatch_examples.m b/infer/tests/codetoanalyze/objc/errors/frontend/dispatch_examples.m deleted file mode 120000 index d78a6db00..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/dispatch_examples.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/dispatch_examples.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/dispatch_in_macro.m b/infer/tests/codetoanalyze/objc/errors/frontend/dispatch_in_macro.m deleted file mode 120000 index 2556f0251..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/dispatch_in_macro.m +++ /dev/null @@ -1 +0,0 @@ -../../frontend/block/dispatch_in_macro.m \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/frontend/struct_initlistexpr.c b/infer/tests/codetoanalyze/objc/errors/frontend/struct_initlistexpr.c deleted file mode 120000 index eb7e6d633..000000000 --- a/infer/tests/codetoanalyze/objc/errors/frontend/struct_initlistexpr.c +++ /dev/null @@ -1 +0,0 @@ -../../../c/frontend/initialization/struct_initlistexpr.c \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/errors/initialization/compound_literal.c b/infer/tests/codetoanalyze/objc/errors/initialization/compound_literal.c new file mode 100644 index 000000000..f37fd794c --- /dev/null +++ b/infer/tests/codetoanalyze/objc/errors/initialization/compound_literal.c @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2016 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +struct point { + int x; + int y; +}; + +int compound_literal_expr() { return ((struct point){.y = 32, .x = 52}).x; } + +int init_with_compound_literal() { + struct point p = (struct point){32, 52}; + return 1 / (p.x - 32); +} diff --git a/infer/tests/codetoanalyze/objc/errors/initialization/struct_initlistexpr.c b/infer/tests/codetoanalyze/objc/errors/initialization/struct_initlistexpr.c new file mode 100644 index 000000000..f13886899 --- /dev/null +++ b/infer/tests/codetoanalyze/objc/errors/initialization/struct_initlistexpr.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2013 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +typedef struct Point { + int x; + int y; +} Point; + +int foo() { return 5; } + +int main() { struct Point p = {1, foo() + 3}; } + +int point_coords_set_correctly(Point* p) { + *p = (Point){4, 5}; + return 1 / (p->x - 4); +} + +struct Employee { + int ssn; + float salary; + struct date { + int date; + int month; + int year; + } doj; +} emp1; + +int field_set_correctly() { + struct Employee e = {12, 3000.50, 12, 12, 2010}; + return 1 / (e.ssn - 12); +} + +struct dotdot { + int a; + int b; +}; + +struct dot { + struct dotdot x; + int y; +}; +struct rect { + struct dot origin; + int z; + int size; +}; + +typedef struct rect rect; + +int implicit_expr_set_correctly() { + rect imageDrawRect; + imageDrawRect = (rect){.size = 5}; + return 1 / imageDrawRect.origin.x.a; +} diff --git a/infer/tests/codetoanalyze/objc/errors/issues.exp b/infer/tests/codetoanalyze/objc/errors/issues.exp index 2c1582206..d8aed48c4 100644 --- a/infer/tests/codetoanalyze/objc/errors/issues.exp +++ b/infer/tests/codetoanalyze/objc/errors/issues.exp @@ -1,48 +1,16 @@ -category_procdesc/main.c, CategoryProcdescMain, 2, MEMORY_LEAK -category_procdesc/main.c, CategoryProcdescMain, 3, MEMORY_LEAK field_superclass/SubtypingExample.m, Employee_initWithName:andAge:andEducation:, 6, DIVIDE_BY_ZERO field_superclass/SubtypingExample.m, subtyping_test, 0, DIVIDE_BY_ZERO -field_superclass/SuperExample.m, ASuper_init, 2, NULL_DEREFERENCE -field_superclass/SuperExample.m, super_example_main, 2, MEMORY_LEAK field_superclass/field.c, field_superclass_main, 3, RETAIN_CYCLE -frontend/BlockVar.m, BlockVar_blockPostBad, 5, NULL_DEREFERENCE -frontend/BlockVar.m, BlockVar_capturedNullDeref, 5, NULL_DEREFERENCE -frontend/BlockVar.m, BlockVar_navigateToURLInBackground, 8, NULL_DEREFERENCE -frontend/NSAssert_example.m, NSAssert_addTarget:, 1, MEMORY_LEAK -frontend/NSAssert_example.m, NSAssert_initWithRequest:, 1, MEMORY_LEAK -frontend/NSAssert_example.m, test1, 1, MEMORY_LEAK -frontend/NSAssert_example.m, test1, 1, MEMORY_LEAK -frontend/NSAssert_example.m, test2, 1, MEMORY_LEAK -frontend/NSAssert_example.m, test2, 1, MEMORY_LEAK -frontend/block.m, main1, 31, DIVIDE_BY_ZERO -frontend/block_no_args.m, My_manager_m, 10, NULL_DEREFERENCE -frontend/block_release.m, My_manager_blockReleaseTODO, 5, MEMORY_LEAK -frontend/compound_literal.c, init_with_compound_literal, 2, DIVIDE_BY_ZERO -frontend/dispatch.m, DispatchA_dispatch_a_block_variable_from_macro_delivers_initialised_object, 3, DIVIDE_BY_ZERO -frontend/struct_initlistexpr.c, field_set_correctly, 2, DIVIDE_BY_ZERO -frontend/struct_initlistexpr.c, implicit_expr_set_correctly, 3, DIVIDE_BY_ZERO -frontend/struct_initlistexpr.c, point_coords_set_correctly, 2, DIVIDE_BY_ZERO global_const/global_const.m, SimpleRoot_doSomethingBadWithDict:andString:, 3, NULL_DEREFERENCE +initialization/compound_literal.c, init_with_compound_literal, 2, DIVIDE_BY_ZERO +initialization/struct_initlistexpr.c, field_set_correctly, 2, DIVIDE_BY_ZERO +initialization/struct_initlistexpr.c, implicit_expr_set_correctly, 3, DIVIDE_BY_ZERO +initialization/struct_initlistexpr.c, point_coords_set_correctly, 2, DIVIDE_BY_ZERO memory_leaks_benchmark/CADisplayLinkRetainCycle.m, testCycle, 3, RETAIN_CYCLE -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_blockCapturedVarLeak, 3, MEMORY_LEAK -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_blockFreeNoLeakTODO, 3, MEMORY_LEAK -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_createCloseCrossGlyph:, 2, MEMORY_LEAK -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_measureFrameSizeForText, 1, MEMORY_LEAK -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_regularLeak, 3, MEMORY_LEAK -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test, 3, MEMORY_LEAK -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test1:, 1, MEMORY_LEAK -memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test2:, 1, MEMORY_LEAK memory_leaks_benchmark/NSStringInitWithBytesNoCopyExample.m, StringInitA_macForIV:, 2, MEMORY_LEAK memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSVycleStaticVar, 2, RETAIN_CYCLE -memory_leaks_benchmark/RetainReleaseExample2.m, test3, 0, MEMORY_LEAK -memory_leaks_benchmark/RetainReleaseExample2.m, test3, 0, RETURN_VALUE_IGNORED -memory_leaks_benchmark/RetainReleaseExample2.m, test4, 3, MEMORY_LEAK -memory_leaks_benchmark/RetainReleaseExample2.m, test5, 2, MEMORY_LEAK -memory_leaks_benchmark/RetainReleaseExample2.m, test6, 3, MEMORY_LEAK memory_leaks_benchmark/RetainReleaseExampleBucketing.m, RetainReleaseTest, 0, RETURN_VALUE_IGNORED memory_leaks_benchmark/RetainReleaseExampleBucketingArc.m, RetainReleaseArcTest, 0, RETURN_VALUE_IGNORED -memory_leaks_benchmark/TollBridgeExample.m, TollBridgeExample_brideRetained, 2, MEMORY_LEAK -memory_leaks_benchmark/TollBridgeExample.m, TollBridgeExample_bridge, 2, MEMORY_LEAK memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, RETAIN_CYCLE memory_leaks_benchmark/retain_cycle2.m, strongcycle2, 4, RETAIN_CYCLE npe/Fraction.m, test_virtual_call, 7, NULL_DEREFERENCE @@ -93,6 +61,38 @@ property/ExplicitIvarName.m, ExplicitIvarNameA_testDefaultName, 7, NULL_DEREFERE property/ExplicitIvarName.m, ExplicitIvarNameA_testExplicit, 6, NULL_DEREFERENCE property/main.c, property_main, 2, MEMORY_LEAK property/main.c, property_main, 3, MEMORY_LEAK +shared/assertions/NSAssert_example.m, NSAssert_addTarget:, 1, MEMORY_LEAK +shared/assertions/NSAssert_example.m, NSAssert_initWithRequest:, 1, MEMORY_LEAK +shared/assertions/NSAssert_example.m, test1, 1, MEMORY_LEAK +shared/assertions/NSAssert_example.m, test1, 1, MEMORY_LEAK +shared/assertions/NSAssert_example.m, test2, 1, MEMORY_LEAK +shared/assertions/NSAssert_example.m, test2, 1, MEMORY_LEAK +shared/block/BlockVar.m, BlockVar_blockPostBad, 5, NULL_DEREFERENCE +shared/block/BlockVar.m, BlockVar_capturedNullDeref, 5, NULL_DEREFERENCE +shared/block/BlockVar.m, BlockVar_navigateToURLInBackground, 8, NULL_DEREFERENCE +shared/block/block.m, main1, 31, DIVIDE_BY_ZERO +shared/block/block_no_args.m, My_manager_m, 10, NULL_DEREFERENCE +shared/block/block_release.m, My_manager_blockReleaseTODO, 5, MEMORY_LEAK +shared/block/dispatch.m, DispatchA_dispatch_a_block_variable_from_macro_delivers_initialised_object, 3, DIVIDE_BY_ZERO +shared/category_procdesc/main.c, CategoryProcdescMain, 2, MEMORY_LEAK +shared/category_procdesc/main.c, CategoryProcdescMain, 3, MEMORY_LEAK +shared/field_superclass/SuperExample.m, ASuper_init, 2, NULL_DEREFERENCE +shared/field_superclass/SuperExample.m, super_example_main, 2, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_blockCapturedVarLeak, 3, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_blockFreeNoLeakTODO, 3, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_createCloseCrossGlyph:, 2, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_measureFrameSizeForText, 1, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_regularLeak, 3, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test, 3, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test1:, 1, MEMORY_LEAK +shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample_test2:, 1, MEMORY_LEAK +shared/memory_leaks_benchmark/RetainReleaseExample2.m, test3, 0, MEMORY_LEAK +shared/memory_leaks_benchmark/RetainReleaseExample2.m, test3, 0, RETURN_VALUE_IGNORED +shared/memory_leaks_benchmark/RetainReleaseExample2.m, test4, 3, MEMORY_LEAK +shared/memory_leaks_benchmark/RetainReleaseExample2.m, test5, 2, MEMORY_LEAK +shared/memory_leaks_benchmark/RetainReleaseExample2.m, test6, 3, MEMORY_LEAK +shared/memory_leaks_benchmark/TollBridgeExample.m, TollBridgeExample_brideRetained, 2, MEMORY_LEAK +shared/memory_leaks_benchmark/TollBridgeExample.m, TollBridgeExample_bridge, 2, MEMORY_LEAK subtyping/KindOfClassExample.m, shouldThrowDivideByZero1, 2, DIVIDE_BY_ZERO subtyping/KindOfClassExample.m, shouldThrowDivideByZero2, 2, DIVIDE_BY_ZERO subtyping/KindOfClassExample.m, shouldThrowDivideByZero3, 3, DIVIDE_BY_ZERO diff --git a/infer/tests/codetoanalyze/objc/errors/shared b/infer/tests/codetoanalyze/objc/errors/shared new file mode 120000 index 000000000..8fba6b66a --- /dev/null +++ b/infer/tests/codetoanalyze/objc/errors/shared @@ -0,0 +1 @@ +../shared \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/frontend/Makefile b/infer/tests/codetoanalyze/objc/frontend/Makefile index d11a574b6..939370e98 100644 --- a/infer/tests/codetoanalyze/objc/frontend/Makefile +++ b/infer/tests/codetoanalyze/objc/frontend/Makefile @@ -16,13 +16,6 @@ OPTIONS = -x objective-c \ -mios-simulator-version-min=8.2 --target=x86_64-apple-darwin14 -c \ FILES_NOARC = \ - block/BlockVar.m \ - block/block-it.m \ - block/block.m \ - block/block_no_args.m \ - block/block_release.m \ - block/dispatch.m \ - block/dispatch_examples.m \ block/retain_cycle.m \ block/static.m \ boxing/Boxing.m \ @@ -33,7 +26,6 @@ FILES_NOARC = \ conditional_operation/ConditionalOperation.m \ exceptions/ExceptionExample.m \ fast_enumeration/Fast_enumeration.m \ - property/PropertyAttributes.m \ property/PropertyCustomAccessor.m \ property/PropertyImplSetter.m \ property/Property_getter.m \ @@ -44,6 +36,26 @@ FILES_NOARC = \ returnstmt/void_return.m \ self_static/Self.m \ self_static/static.m \ + shared/block/block-it.m \ + shared/block/block.m \ + shared/block/block_no_args.m \ + shared/block/block_release.m \ + shared/block/dispatch.m \ + shared/block/dispatch_examples.m \ + shared/block/dispatch_in_macro.m \ + shared/category_procdesc/EOCPerson.m \ + shared/category_procdesc/main.c \ + shared/field_superclass/SuperExample.m \ + shared/memory_leaks_benchmark/AutoreleaseExample.m \ + shared/memory_leaks_benchmark/MemoryLeakExample.m \ + shared/memory_leaks_benchmark/RetainReleaseExample.m \ + shared/memory_leaks_benchmark/RetainReleaseExample2.m \ + shared/memory_leaks_benchmark/TollBridgeExample.m \ + shared/npe/npe_malloc.m \ + shared/property/GetterExample.m \ + shared/property/PropertyAttributes.m \ + shared/protocol_procdesc/Bicycle.m \ + shared/protocol_procdesc/main.c \ strings/global_string_literal.m \ strings/string_literal.m \ subclass/MyClass.m \ @@ -53,26 +65,17 @@ FILES_NOARC = \ vardecl/aclass.m \ vardecl/aclass_2.m \ vardecl/last_af.m \ - link_to_errors/category_procdesc/EOCPerson.m \ - link_to_errors/category_procdesc/main.c \ - link_to_errors/field_superclass/SuperExample.m \ - link_to_errors/memory_leaks_benchmark/AutoreleaseExample.m \ - link_to_errors/memory_leaks_benchmark/MemoryLeakExample.m \ - link_to_errors/memory_leaks_benchmark/RetainReleaseExample.m \ - link_to_errors/memory_leaks_benchmark/RetainReleaseExample2.m \ - link_to_errors/memory_leaks_benchmark/TollBridgeExample.m \ - link_to_errors/npe/npe_malloc.m \ - link_to_errors/protocol_procdesc/main.c \ FILES_ARC = \ - assertions/NSAssert_example.m \ predefined_expr/PredefinedExprExample.m \ types/attributes.m \ types/void_call.m \ vardecl/initlist.m \ - link_to_errors/npe/Nonnull_attribute_example.m \ - link_to_errors/memory_leaks_benchmark/ArcExample.m \ - link_to_errors/memory_leaks_benchmark/arc_methods.m \ + shared/assertions/NSAssert_example.m \ + shared/block/BlockVar.m \ + shared/memory_leaks_benchmark/ArcExample.m \ + shared/memory_leaks_benchmark/arc_methods.m \ + shared/npe/Nonnull_attribute_example.m \ FILES = \ $(FILES_NOARC) \ diff --git a/infer/tests/codetoanalyze/objc/frontend/link_to_errors b/infer/tests/codetoanalyze/objc/frontend/link_to_errors deleted file mode 120000 index 96cb529cb..000000000 --- a/infer/tests/codetoanalyze/objc/frontend/link_to_errors +++ /dev/null @@ -1 +0,0 @@ -../errors/ \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/frontend/shared b/infer/tests/codetoanalyze/objc/frontend/shared new file mode 120000 index 000000000..8fba6b66a --- /dev/null +++ b/infer/tests/codetoanalyze/objc/frontend/shared @@ -0,0 +1 @@ +../shared \ No newline at end of file diff --git a/infer/tests/codetoanalyze/objc/linters/Makefile b/infer/tests/codetoanalyze/objc/linters/Makefile index dd1813d57..77e97c092 100644 --- a/infer/tests/codetoanalyze/objc/linters/Makefile +++ b/infer/tests/codetoanalyze/objc/linters/Makefile @@ -19,5 +19,5 @@ compile: clang $(OPTIONS) $(FILES) analyze: - $(INFER_BIN) -a $(ANALYZER) --cxx --ml-buckets all --check-duplicate-symbols -- clang $(OPTIONS) $(FILES) >/dev/null 2>duplicates.txt + $(INFER_BIN) -a $(ANALYZER) --check-duplicate-symbols -- clang $(OPTIONS) $(FILES) >/dev/null 2>duplicates.txt grep "DUPLICATE_SYMBOLS" duplicates.txt; test $$? -ne 0 diff --git a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m b/infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m rename to infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m diff --git a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m.dot b/infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m.dot similarity index 95% rename from infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m.dot rename to infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m.dot index 669d2b4c2..2fcde68a3 100644 --- a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/assertions/NSAssert_example.m.dot @@ -29,7 +29,7 @@ digraph iCFG { 99 -> 104 ; -98 [label="98: DeclStmt \n n$16=_fun_NSString_stringWithUTF8String:(\"assertions/NSAssert_example.m\":char *) [line 36]\n _fun___objc_retain(n$16:class NSString *) [line 36]\n *&__assert_file__:class NSString *=n$16 [line 36]\n " shape="box"] +98 [label="98: DeclStmt \n n$16=_fun_NSString_stringWithUTF8String:(\"shared/assertions/NSAssert_example.m\":char *) [line 36]\n _fun___objc_retain(n$16:class NSString *) [line 36]\n *&__assert_file__:class NSString *=n$16 [line 36]\n " shape="box"] 98 -> 93 ; @@ -149,7 +149,7 @@ digraph iCFG { 70 -> 75 ; -69 [label="69: DeclStmt \n n$15=_fun_NSString_stringWithUTF8String:(\"assertions/NSAssert_example.m\":char *) [line 31]\n _fun___objc_retain(n$15:class NSString *) [line 31]\n *&__assert_file__:class NSString *=n$15 [line 31]\n " shape="box"] +69 [label="69: DeclStmt \n n$15=_fun_NSString_stringWithUTF8String:(\"shared/assertions/NSAssert_example.m\":char *) [line 31]\n _fun___objc_retain(n$15:class NSString *) [line 31]\n *&__assert_file__:class NSString *=n$15 [line 31]\n " shape="box"] 69 -> 64 ; @@ -244,7 +244,7 @@ digraph iCFG { 47 -> 50 ; -46 [label="46: DeclStmt \n n$33=_fun_NSString_stringWithUTF8String:(\"assertions/NSAssert_example.m\":char *) [line 24]\n _fun___objc_retain(n$33:class NSString *) [line 24]\n *&__assert_file__:class NSString *=n$33 [line 24]\n " shape="box"] +46 [label="46: DeclStmt \n n$33=_fun_NSString_stringWithUTF8String:(\"shared/assertions/NSAssert_example.m\":char *) [line 24]\n _fun___objc_retain(n$33:class NSString *) [line 24]\n *&__assert_file__:class NSString *=n$33 [line 24]\n " shape="box"] 46 -> 41 ; @@ -339,7 +339,7 @@ digraph iCFG { 24 -> 27 ; -23 [label="23: DeclStmt \n n$16=_fun_NSString_stringWithUTF8String:(\"assertions/NSAssert_example.m\":char *) [line 19]\n _fun___objc_retain(n$16:class NSString *) [line 19]\n *&__assert_file__:class NSString *=n$16 [line 19]\n " shape="box"] +23 [label="23: DeclStmt \n n$16=_fun_NSString_stringWithUTF8String:(\"shared/assertions/NSAssert_example.m\":char *) [line 19]\n _fun___objc_retain(n$16:class NSString *) [line 19]\n *&__assert_file__:class NSString *=n$16 [line 19]\n " shape="box"] 23 -> 18 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.h b/infer/tests/codetoanalyze/objc/shared/block/BlockVar.h similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/BlockVar.h rename to infer/tests/codetoanalyze/objc/shared/block/BlockVar.h diff --git a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.m b/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/BlockVar.m rename to infer/tests/codetoanalyze/objc/shared/block/BlockVar.m diff --git a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.m.dot b/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/BlockVar.m.dot rename to infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block-it.m b/infer/tests/codetoanalyze/objc/shared/block/block-it.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block-it.m rename to infer/tests/codetoanalyze/objc/shared/block/block-it.m diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block-it.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block-it.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block-it.m.dot rename to infer/tests/codetoanalyze/objc/shared/block/block-it.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block.m b/infer/tests/codetoanalyze/objc/shared/block/block.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block.m rename to infer/tests/codetoanalyze/objc/shared/block/block.m diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block.m.dot rename to infer/tests/codetoanalyze/objc/shared/block/block.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.m b/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block_no_args.m rename to infer/tests/codetoanalyze/objc/shared/block/block_no_args.m diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block_no_args.m.dot rename to infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_release.m b/infer/tests/codetoanalyze/objc/shared/block/block_release.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block_release.m rename to infer/tests/codetoanalyze/objc/shared/block/block_release.m diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_release.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/block_release.m.dot rename to infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.m b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/dispatch.m rename to infer/tests/codetoanalyze/objc/shared/block/dispatch.m diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/dispatch.m.dot rename to infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.m b/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.m rename to infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.m.dot rename to infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_in_macro.m b/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/block/dispatch_in_macro.m rename to infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot new file mode 100644 index 000000000..6c26a0c27 --- /dev/null +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot @@ -0,0 +1,25 @@ +/* @generated */ +digraph iCFG { +6 [label="6: Return Stmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchInMacroTest______1); [line 23]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchInMacroTest______1 ):unsigned long ) [line 23]\n *&__objc_anonymous_block_DispatchInMacroTest______1:class __objc_anonymous_block_DispatchInMacroTest______1 =n$3 [line 23]\n n$4=*&#GB$DispatchInMacroTest_static_storage:class NSObject * [line 23]\n *n$3.DispatchInMacroTest_static_storage:class NSObject *=n$4 [line 23]\n n$5=(_fun___objc_anonymous_block_DispatchInMacroTest______1)() [line 23]\n n$0=*&#GB$DispatchInMacroTest_static_storage:class NSObject * [line 23]\n *&return:struct objc_object *=n$0 [line 23]\n " shape="box"] + + + 6 -> 2 ; +5 [label="5: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(class NSObject ):unsigned long ) [line 23]\n n$2=_fun_NSObject_init(n$1:class NSObject *) virtual [line 23]\n *&#GB$DispatchInMacroTest_static_storage:class NSObject *=n$2 [line 23]\n " shape="box"] + + + 5 -> 4 ; +4 [label="4: Exit __objc_anonymous_block_DispatchInMacroTest______1 \n " color=yellow style=filled] + + +3 [label="3: Start __objc_anonymous_block_DispatchInMacroTest______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 23]\n " color=yellow style=filled] + + + 3 -> 5 ; +2 [label="2: Exit DispatchInMacroTest \n " color=yellow style=filled] + + +1 [label="1: Start DispatchInMacroTest\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 22]\n " color=yellow style=filled] + + + 1 -> 6 ; +} diff --git a/infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.h b/infer/tests/codetoanalyze/objc/shared/category_procdesc/EOCPerson.h similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.h rename to infer/tests/codetoanalyze/objc/shared/category_procdesc/EOCPerson.h diff --git a/infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.m b/infer/tests/codetoanalyze/objc/shared/category_procdesc/EOCPerson.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.m rename to infer/tests/codetoanalyze/objc/shared/category_procdesc/EOCPerson.m diff --git a/infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.m.dot b/infer/tests/codetoanalyze/objc/shared/category_procdesc/EOCPerson.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/category_procdesc/EOCPerson.m.dot rename to infer/tests/codetoanalyze/objc/shared/category_procdesc/EOCPerson.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/category_procdesc/main.c b/infer/tests/codetoanalyze/objc/shared/category_procdesc/main.c similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/category_procdesc/main.c rename to infer/tests/codetoanalyze/objc/shared/category_procdesc/main.c diff --git a/infer/tests/codetoanalyze/objc/errors/category_procdesc/main.c.dot b/infer/tests/codetoanalyze/objc/shared/category_procdesc/main.c.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/category_procdesc/main.c.dot rename to infer/tests/codetoanalyze/objc/shared/category_procdesc/main.c.dot diff --git a/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.m b/infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.m rename to infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m diff --git a/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.m.dot b/infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.m.dot rename to infer/tests/codetoanalyze/objc/shared/field_superclass/SuperExample.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.m b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.m rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.m.dot rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.m b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.m rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot similarity index 95% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.m.dot rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot index ec5cadec7..cdfd6dc51 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot @@ -1,9 +1,9 @@ /* @generated */ digraph iCFG { -37 [label="37: Exit frontend_checks_10391c9ce4c9dbd06a97986e9fc1220c \n " color=yellow style=filled] +37 [label="37: Exit frontend_checks_f58a0b6e21d3528ef40ccf2efe3d35a4 \n " color=yellow style=filled] -36 [label="36: Start frontend_checks_10391c9ce4c9dbd06a97986e9fc1220c\nFormals: \nLocals: \n " color=yellow style=filled] +36 [label="36: Start frontend_checks_f58a0b6e21d3528ef40ccf2efe3d35a4\nFormals: \nLocals: \n " color=yellow style=filled] 36 -> 37 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.h b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.h similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.h rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.h diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.m b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.m rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.m.dot rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.m b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.m rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample.m diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.m.dot rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.m b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.m rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.m.dot rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.m b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.m rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.m.dot rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.m b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/arc_methods.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.m rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/arc_methods.m diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/arc_methods.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.m.dot rename to infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/arc_methods.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.m b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.m rename to infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m diff --git a/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.m.dot b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.m.dot rename to infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot diff --git a/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.m b/infer/tests/codetoanalyze/objc/shared/npe/npe_malloc.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.m rename to infer/tests/codetoanalyze/objc/shared/npe/npe_malloc.m diff --git a/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.m.dot b/infer/tests/codetoanalyze/objc/shared/npe/npe_malloc.m.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.m.dot rename to infer/tests/codetoanalyze/objc/shared/npe/npe_malloc.m.dot diff --git a/infer/tests/codetoanalyze/objc/frontend/property/GetterExample.h b/infer/tests/codetoanalyze/objc/shared/property/GetterExample.h similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/property/GetterExample.h rename to infer/tests/codetoanalyze/objc/shared/property/GetterExample.h diff --git a/infer/tests/codetoanalyze/objc/frontend/property/GetterExample.m b/infer/tests/codetoanalyze/objc/shared/property/GetterExample.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/property/GetterExample.m rename to infer/tests/codetoanalyze/objc/shared/property/GetterExample.m diff --git a/infer/tests/codetoanalyze/objc/shared/property/GetterExample.m.dot b/infer/tests/codetoanalyze/objc/shared/property/GetterExample.m.dot new file mode 100644 index 000000000..a779953d3 --- /dev/null +++ b/infer/tests/codetoanalyze/objc/shared/property/GetterExample.m.dot @@ -0,0 +1,22 @@ +/* @generated */ +digraph iCFG { +5 [label="5: DeclStmt \n n$3=_fun___objc_alloc_no_fail(sizeof(class GetterExample ):unsigned long ) [line 15]\n n$4=_fun_NSObject_init(n$3:class GetterExample *) virtual [line 15]\n *&a:class GetterExample *=n$4 [line 15]\n " shape="box"] + + + 5 -> 4 ; +4 [label="4: Message Call: setName: \n n$2=*&a:class GetterExample * [line 16]\n _fun_GetterExample_setName:(n$2:class GetterExample *,5:int ) [line 16]\n " shape="box"] + + + 4 -> 3 ; +3 [label="3: Return Stmt \n n$0=*&a:class GetterExample * [line 17]\n n$1=_fun_GetterExample_name(n$0:class GetterExample *) [line 17]\n *&return:int =(1 / (n$1 - 5)) [line 17]\n " shape="box"] + + + 3 -> 2 ; +2 [label="2: Exit should_have_div0 \n " color=yellow style=filled] + + +1 [label="1: Start should_have_div0\nFormals: \nLocals: a:class GetterExample * \n DECLARE_LOCALS(&return,&a); [line 14]\n " color=yellow style=filled] + + + 1 -> 5 ; +} diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.m b/infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m similarity index 100% rename from infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.m rename to infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.m.dot b/infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m.dot similarity index 93% rename from infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.m.dot rename to infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m.dot index 78fb31257..f44ea62ac 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m.dot @@ -1,9 +1,9 @@ /* @generated */ digraph iCFG { -21 [label="21: Exit frontend_checks_b9a66dfb333031907793a9bdd13fca5f \n " color=yellow style=filled] +21 [label="21: Exit frontend_checks_5b931347d68cd9eea4643dd614e081ac \n " color=yellow style=filled] -20 [label="20: Start frontend_checks_b9a66dfb333031907793a9bdd13fca5f\nFormals: \nLocals: \n " color=yellow style=filled] +20 [label="20: Start frontend_checks_5b931347d68cd9eea4643dd614e081ac\nFormals: \nLocals: \n " color=yellow style=filled] 20 -> 21 ; diff --git a/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/Bicycle.h b/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.h similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/protocol_procdesc/Bicycle.h rename to infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.h diff --git a/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/Bicycle.m b/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.m similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/protocol_procdesc/Bicycle.m rename to infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.m diff --git a/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.m.dot b/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.m.dot new file mode 100644 index 000000000..d177b1c1c --- /dev/null +++ b/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/Bicycle.m.dot @@ -0,0 +1,69 @@ +/* @generated */ +digraph iCFG { +18 [label="18: Call _fun_NSLog \n n$5=_fun_NSString_stringWithUTF8String:(\"Locked to structure. Don't forget the combination!\":char *) [line 32]\n _fun_NSLog(n$5:struct objc_object *) [line 32]\n " shape="box"] + + + 18 -> 17 ; +17 [label="17: Exit Bicycle_lockToStructure: \n " color=yellow style=filled] + + +16 [label="16: Start Bicycle_lockToStructure:\nFormals: self:class Bicycle * theStructure:struct objc_object *\nLocals: \n DECLARE_LOCALS(&return); [line 31]\n " color=yellow style=filled] + + + 16 -> 18 ; +15 [label="15: Call _fun_NSLog \n n$4=_fun_NSString_stringWithUTF8String:(\"Front wheel is off.Should probably replace that before pedaling...\":char *) [line 28]\n _fun_NSLog(n$4:struct objc_object *) [line 28]\n " shape="box"] + + + 15 -> 14 ; +14 [label="14: Exit Bicycle_removeFrontWheel \n " color=yellow style=filled] + + +13 [label="13: Start Bicycle_removeFrontWheel\nFormals: self:class Bicycle *\nLocals: \n DECLARE_LOCALS(&return); [line 27]\n " color=yellow style=filled] + + + 13 -> 15 ; +12 [label="12: Call _fun_NSLog \n n$3=_fun_NSString_stringWithUTF8String:(\"Here we go!\":char *) [line 25]\n _fun_NSLog(n$3:struct objc_object *) [line 25]\n " shape="box"] + + + 12 -> 11 ; +11 [label="11: Exit Bicycle_startPedaling \n " color=yellow style=filled] + + +10 [label="10: Start Bicycle_startPedaling\nFormals: self:class Bicycle *\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled] + + + 10 -> 12 ; +9 [label="9: Call _fun_NSLog \n n$2=_fun_NSString_stringWithUTF8String:(\"Bending left arm upwards\":char *) [line 22]\n _fun_NSLog(n$2:struct objc_object *) [line 22]\n " shape="box"] + + + 9 -> 8 ; +8 [label="8: Exit Bicycle_signalRightTurn \n " color=yellow style=filled] + + +7 [label="7: Start Bicycle_signalRightTurn\nFormals: self:class Bicycle *\nLocals: \n DECLARE_LOCALS(&return); [line 21]\n " color=yellow style=filled] + + + 7 -> 9 ; +6 [label="6: Call _fun_NSLog \n n$1=_fun_NSString_stringWithUTF8String:(\"Extending left arm outwards\":char *) [line 19]\n _fun_NSLog(n$1:struct objc_object *) [line 19]\n " shape="box"] + + + 6 -> 5 ; +5 [label="5: Exit Bicycle_signalLeftTurn \n " color=yellow style=filled] + + +4 [label="4: Start Bicycle_signalLeftTurn\nFormals: self:class Bicycle *\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n " color=yellow style=filled] + + + 4 -> 6 ; +3 [label="3: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"Bending left arm downwards\":char *) [line 16]\n _fun_NSLog(n$0:struct objc_object *) [line 16]\n " shape="box"] + + + 3 -> 2 ; +2 [label="2: Exit Bicycle_signalStop \n " color=yellow style=filled] + + +1 [label="1: Start Bicycle_signalStop\nFormals: self:class Bicycle *\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] + + + 1 -> 3 ; +} diff --git a/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/StreetVehicle.h b/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/StreetVehicle.h similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/protocol_procdesc/StreetVehicle.h rename to infer/tests/codetoanalyze/objc/shared/protocol_procdesc/StreetVehicle.h diff --git a/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.c b/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/main.c similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.c rename to infer/tests/codetoanalyze/objc/shared/protocol_procdesc/main.c diff --git a/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.c.dot b/infer/tests/codetoanalyze/objc/shared/protocol_procdesc/main.c.dot similarity index 100% rename from infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.c.dot rename to infer/tests/codetoanalyze/objc/shared/protocol_procdesc/main.c.dot diff --git a/infer/tests/codetoanalyze/objcpp/linters/Makefile b/infer/tests/codetoanalyze/objcpp/linters/Makefile index f7dbe3a8e..117de2151 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/Makefile +++ b/infer/tests/codetoanalyze/objcpp/linters/Makefile @@ -18,5 +18,5 @@ compile: clang $(OPTIONS) $(FILES) analyze: - $(INFER_BIN) -a $(ANALYZER) --cxx --ml-buckets all --check-duplicate-symbols -- clang $(OPTIONS) $(FILES) >/dev/null 2>duplicates.txt + $(INFER_BIN) -a $(ANALYZER) --check-duplicate-symbols -- clang $(OPTIONS) $(FILES) >/dev/null 2>duplicates.txt grep "DUPLICATE_SYMBOLS" duplicates.txt; test $$? -ne 0