[clang-repl] Lay the foundation of pretty printing for C. (#89811)
[llvm-project.git] / clang / test / APINotes / objc_designated_inits.m
blob1f2b8ed534b7a170b9915e8dfb2894d476e36b54
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
4 #include "HeaderLib.h"
5 #import <SomeKit/SomeKit.h>
7 @interface CSub : C
8 -(instancetype)initWithA:(A*)a;
9 @end
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;
17 @end