diff --git a/infer/src/clang/ComponentKit.ml b/infer/src/clang/ComponentKit.ml index d9c89da40..36f905fcd 100644 --- a/infer/src/clang/ComponentKit.ml +++ b/infer/src/clang/ComponentKit.ml @@ -227,6 +227,7 @@ let component_with_unconventional_superclass_advice context an = ; ckcomponentcontroller_cl ; "CKCompositeComponent" ; "CKRenderComponent" + ; "CKRenderLayoutComponent" ; "CKRenderWithChildrenComponent" ; "CKStatefulViewComponent" ; "CKStatefulViewComponentController" diff --git a/infer/tests/codetoanalyze/objcpp/linters/componentkit/FakeComponentKitHeader.h b/infer/tests/codetoanalyze/objcpp/linters/componentkit/FakeComponentKitHeader.h index 60f49e946..2fb96cf33 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/componentkit/FakeComponentKitHeader.h +++ b/infer/tests/codetoanalyze/objcpp/linters/componentkit/FakeComponentKitHeader.h @@ -66,3 +66,7 @@ class CKComponentScope { // Mimic importing CKRenderWithChildrenComponent @interface CKRenderWithChildrenComponent : CKComponent @end + +// Mimic importing CKRenderLayoutComponent +@interface CKRenderLayoutComponent : CKComponent +@end diff --git a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h index 84d9c9004..23b80ab56 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h +++ b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h @@ -26,3 +26,6 @@ @interface RenderWithChildrenFooComponent : CKRenderWithChildrenComponent // good @end + +@interface RenderLayoutFooComponent : CKRenderLayoutComponent // good +@end diff --git a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm index 4819245ee..2e84413ec 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm +++ b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm @@ -23,3 +23,6 @@ @implementation RenderWithChildrenFooComponent @end + +@implementation RenderLayoutFooComponent +@end