annotate clang/test/SemaObjCXX/class-method-self.mm @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -verify -Wno-objc-root-class %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 @interface XX
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 - (void)addObserver:(XX*)o; // expected-note 2{{passing argument to parameter 'o' here}}
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 @end
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 @interface YY
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 + (void)classMethod;
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 @end
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 @implementation YY
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 static XX *obj;
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 + (void)classMethod {
anatofuz
parents:
diff changeset
20 [obj addObserver:self]; // expected-error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}}
anatofuz
parents:
diff changeset
21 Class whatever;
anatofuz
parents:
diff changeset
22 [obj addObserver:whatever]; // expected-error {{cannot initialize a parameter of type 'XX *' with an lvalue of type 'Class'}}
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24 @end
anatofuz
parents:
diff changeset
25