| 1 |
// RUN: rm -rf %t && mkdir -p %t |
| 2 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules -Wno-private-module -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -verify |
| 3 |
|
| 4 |
#include "HeaderLib.h" |
| 5 |
#import <SomeKit/SomeKit.h> |
| 6 |
|
| 7 |
@interface CSub : C |
| 8 |
-(instancetype)initWithA:(A*)a; |
| 9 |
@end |
| 10 |
|
| 11 |
@implementation CSub |
| 12 |
-(instancetype)initWithA:(A*)a { // expected-warning{{designated initializer missing a 'super' call to a designated initializer of the super class}} |
| 13 |
// expected-note@SomeKit/SomeKit.h:20 2{{method marked as designated initializer of the class here}} |
| 14 |
self = [super init]; // expected-warning{{designated initializer invoked a non-designated initializer}} |
| 15 |
return self; |
| 16 |
} |
| 17 |
@end |