[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjC / class-conforming-protocol-2.m
bloba3bd0b1d2398fa2aef7bfc26ea5936e4ec782e8e
1 // RUN: %clang_cc1 -Wmethod-signatures -fsyntax-only -verify %s
3 @protocol NSWindowDelegate @end
5 @protocol IBStringsTableWindowDelegate <NSWindowDelegate>
6 @end
8 @interface NSWindow
9 - (void)setDelegate:(id <NSWindowDelegate>)anObject; // expected-note {{previous definition is here}}
10 - (id <IBStringsTableWindowDelegate>) delegate; // expected-note {{previous definition is here}}
11 @end
14 @interface IBStringsTableWindow : NSWindow {}
15 @end
17 @implementation IBStringsTableWindow
18 - (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate { // expected-warning {{conflicting parameter types in implementation of 'setDelegate:'}}
20 - (id <NSWindowDelegate>)delegate { // expected-warning {{conflicting return type in implementation of 'delegate':}}
21         return 0;
23 @end