[objc frontend] Keep the counter for block names local to each procedure

Reviewed By: skcho

Differential Revision: D17282572

fbshipit-source-id: 116857a7e
master
Dulma Churchill 5 years ago committed by Facebook Github Bot
parent d397ea03d1
commit ab683af1f1

@ -769,6 +769,8 @@ module CProcname = struct
name_info.Clang_ast_t.ni_name name_info.Clang_ast_t.ni_name
in in
objc_method_procname decl_info method_name mdi [] objc_method_procname decl_info method_name mdi []
| BlockDecl _ ->
Typ.Procname.Block (Typ.Procname.Block.make Config.anonymous_block_prefix [])
| _ -> | _ ->
from_decl method_decl from_decl method_decl
end end

@ -205,8 +205,8 @@ codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, InContextOfMe
codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, InContextOfMethodsTest::method, 14, TEST_VAR_TYPE_CHECK, no_bucket, WARNING, [] codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, InContextOfMethodsTest::method, 14, TEST_VAR_TYPE_CHECK, no_bucket, WARNING, []
codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, function, 25, TEST_IN_FUNCTION_CONTEXT, no_bucket, WARNING, [] codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, function, 25, TEST_IN_FUNCTION_CONTEXT, no_bucket, WARNING, []
codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, function, 25, TEST_VAR_TYPE_CHECK, no_bucket, WARNING, [] codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, function, 25, TEST_VAR_TYPE_CHECK, no_bucket, WARNING, []
codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, objc_block_1, 19, TEST_VAR_TYPE_CHECK, no_bucket, WARNING, [] codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, objc_block, 19, TEST_IN_BLOCK_CONTEXT, no_bucket, WARNING, []
codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, objc_block_2, 19, TEST_IN_BLOCK_CONTEXT, no_bucket, WARNING, [] codetoanalyze/objc/linters-for-test-only/InContextOfMethodsTest.m, objc_block, 19, TEST_VAR_TYPE_CHECK, no_bucket, WARNING, []
codetoanalyze/objc/linters-for-test-only/InSubclassExample.m, HappySadView2::makeBadAction, 33, IN_SUBCLASS_TEST, no_bucket, WARNING, [] codetoanalyze/objc/linters-for-test-only/InSubclassExample.m, HappySadView2::makeBadAction, 33, IN_SUBCLASS_TEST, no_bucket, WARNING, []
codetoanalyze/objc/linters-for-test-only/PrivateAPIChecker.m, TestView::methoddd, 19, TEST_SELECTOR, no_bucket, WARNING, [] codetoanalyze/objc/linters-for-test-only/PrivateAPIChecker.m, TestView::methoddd, 19, TEST_SELECTOR, no_bucket, WARNING, []
codetoanalyze/objc/linters-for-test-only/PrivateInstanceMethod.m, ClassWithPrivateMethods::_badMethod1, 51, UNNECESSARY_OBJC_INSTANCE_METHOD, no_bucket, ERROR, [] codetoanalyze/objc/linters-for-test-only/PrivateInstanceMethod.m, ClassWithPrivateMethods::_badMethod1, 51, UNNECESSARY_OBJC_INSTANCE_METHOD, no_bucket, ERROR, []

@ -18,7 +18,7 @@ codetoanalyze/objc/linters/atomic_prop.m, A::readP, 77, POINTER_TO_INTEGRAL_IMPL
codetoanalyze/objc/linters/atomic_prop.m, A::readQ, 85, DIRECT_ATOMIC_PROPERTY_ACCESS, no_bucket, WARNING, [] codetoanalyze/objc/linters/atomic_prop.m, A::readQ, 85, DIRECT_ATOMIC_PROPERTY_ACCESS, no_bucket, WARNING, []
codetoanalyze/objc/linters/atomic_prop.m, A::readQ, 85, POINTER_TO_INTEGRAL_IMPLICIT_CAST, no_bucket, WARNING, [] codetoanalyze/objc/linters/atomic_prop.m, A::readQ, 85, POINTER_TO_INTEGRAL_IMPLICIT_CAST, no_bucket, WARNING, []
codetoanalyze/objc/linters/atomic_prop.m, A::writeQ, 81, DIRECT_ATOMIC_PROPERTY_ACCESS, no_bucket, WARNING, [] codetoanalyze/objc/linters/atomic_prop.m, A::writeQ, 81, DIRECT_ATOMIC_PROPERTY_ACCESS, no_bucket, WARNING, []
codetoanalyze/objc/linters/atomic_prop.m, objc_block_1, 113, DIRECT_ATOMIC_PROPERTY_ACCESS, no_bucket, WARNING, [] codetoanalyze/objc/linters/atomic_prop.m, objc_block, 113, DIRECT_ATOMIC_PROPERTY_ACCESS, no_bucket, WARNING, []
codetoanalyze/objc/linters/badpointer.m, bad1, 15, BAD_POINTER_COMPARISON, no_bucket, WARNING, [] codetoanalyze/objc/linters/badpointer.m, bad1, 15, BAD_POINTER_COMPARISON, no_bucket, WARNING, []
codetoanalyze/objc/linters/badpointer.m, bad10, 130, BAD_POINTER_COMPARISON, no_bucket, WARNING, [] codetoanalyze/objc/linters/badpointer.m, bad10, 130, BAD_POINTER_COMPARISON, no_bucket, WARNING, []
codetoanalyze/objc/linters/badpointer.m, bad11, 139, BAD_POINTER_COMPARISON, no_bucket, WARNING, [] codetoanalyze/objc/linters/badpointer.m, bad11, 139, BAD_POINTER_COMPARISON, no_bucket, WARNING, []

@ -27,11 +27,11 @@ codetoanalyze/objcpp/linters-for-test-only/TestStructFieldChecks.mm, Linters_dum
codetoanalyze/objcpp/linters-for-test-only/TestStructFieldChecks.mm, buttonComponent, 31, TITLE_NOT_INITIALIZED, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/TestStructFieldChecks.mm, buttonComponent, 31, TITLE_NOT_INITIALIZED, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/TestStructFieldChecks.mm, buttonComponent, 33, TITLE_NOT_INITIALIZED, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/TestStructFieldChecks.mm, buttonComponent, 33, TITLE_NOT_INITIALIZED, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/TestStructFieldChecks.mm, buttonComponent, 37, TITLE_NOT_INITIALIZED, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/TestStructFieldChecks.mm, buttonComponent, 37, TITLE_NOT_INITIALIZED, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block_2, 48, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block, 48, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block_3, 59, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block, 59, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block_4, 71, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block, 71, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block_5, 83, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/componentblock.mm, objc_block, 83, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/hash_test.mm, std::hash_NSObject_*_::operator(), 12, DISCOURAGED_HASH_METHOD_INVOCATION, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/hash_test.mm, std::hash_NSObject_*_::operator(), 12, DISCOURAGED_HASH_METHOD_INVOCATION, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/stateless.m, Linters_dummy_method, 21, ADHERE_TO_PROTOCOL, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/stateless.m, Linters_dummy_method, 21, ADHERE_TO_PROTOCOL, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/stateless.m, Linters_dummy_method, 24, ONLY_ONE_CLASS_METHOD, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/stateless.m, Linters_dummy_method, 24, ONLY_ONE_CLASS_METHOD, no_bucket, WARNING, []
codetoanalyze/objcpp/linters-for-test-only/static.m, objc_block_1, 18, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, [] codetoanalyze/objcpp/linters-for-test-only/static.m, objc_block, 18, OBJC_BLOCK_CAPTURING_VALUES, no_bucket, WARNING, []

@ -4,8 +4,8 @@ codetoanalyze/objcpp/linters/componentkit/FactoryFunctionTest.mm, ExampleFunctio
codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, FooComponent::newDerp, 17, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, FooComponent::newDerp, 17, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, []
codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, FooComponent::newDerp, 22, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, FooComponent::newDerp, 22, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, []
codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, FooComponent::newDerp, 27, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, FooComponent::newDerp, 27, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, []
codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, objc_block_1, 35, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, objc_block, 35, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, []
codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, objc_block_2, 39, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/InitializerWithSideEffectTest.mm, objc_block, 39, COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS, no_bucket, ADVICE, []
codetoanalyze/objcpp/linters/componentkit/MultipleFactoryMethodsTest.h, Linters_dummy_method, 18, COMPONENT_WITH_MULTIPLE_FACTORY_METHODS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/MultipleFactoryMethodsTest.h, Linters_dummy_method, 18, COMPONENT_WITH_MULTIPLE_FACTORY_METHODS, no_bucket, ADVICE, []
codetoanalyze/objcpp/linters/componentkit/MultipleFactoryMethodsTest.h, Linters_dummy_method, 30, COMPONENT_WITH_MULTIPLE_FACTORY_METHODS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/MultipleFactoryMethodsTest.h, Linters_dummy_method, 30, COMPONENT_WITH_MULTIPLE_FACTORY_METHODS, no_bucket, ADVICE, []
codetoanalyze/objcpp/linters/componentkit/MultipleFactoryMethodsTest.h, Linters_dummy_method, 53, COMPONENT_WITH_MULTIPLE_FACTORY_METHODS, no_bucket, ADVICE, [] codetoanalyze/objcpp/linters/componentkit/MultipleFactoryMethodsTest.h, Linters_dummy_method, 53, COMPONENT_WITH_MULTIPLE_FACTORY_METHODS, no_bucket, ADVICE, []

Loading…
Cancel
Save