diff --git a/infer/src/clang/ComponentKit.ml b/infer/src/clang/ComponentKit.ml index e50ecfaa2..07076ee29 100644 --- a/infer/src/clang/ComponentKit.ml +++ b/infer/src/clang/ComponentKit.ml @@ -156,7 +156,8 @@ let component_with_unconventional_superclass_advice context decl = ckcomponentcontroller_cl; "CKCompositeComponent"; "CKStatefulViewComponent"; - "CKStatefulViewComponentController" + "CKStatefulViewComponentController"; + "NTNativeTemplateComponent" ] -> true | _ -> false in let condition = diff --git a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h index d4fcb9168..02b68b020 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h +++ b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.h @@ -16,3 +16,9 @@ @interface BarComponent : FooComponent // bad @end + +@interface NTNativeTemplateComponent : CKCompositeComponent // fake NT +@end + +@interface NativeTemplateComponent : NTNativeTemplateComponent // good +@end diff --git a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm index 140455815..d783e4fc7 100644 --- a/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm +++ b/infer/tests/codetoanalyze/objcpp/linters/componentkit/UnconventionalSuperclassTest.mm @@ -16,3 +16,6 @@ @implementation BarComponent @end + +@implementation NativeTemplateComponent +@end