blob: 8112cfa3d52175f954c80259ea9cd0e46eb992f2 [file] [log] [blame]
Alex Lorenzd9f12842017-08-25 16:12:17 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -Wobjc-messaging-id %s
2
3@interface CallMeMaybe
4
5- (void)doThing:(int)intThing;
6
7@property int thing;
8
9@end
10
11template<typename T>
12void instantiate(const T &x) {
13 [x setThing: 22]; // expected-warning {{messaging unqualified id}}
14}
15
16void fn() {
17 id myObject;
18 [myObject doThing: 10]; // expected-warning {{messaging unqualified id}}
19 [myObject setThing: 11]; // expected-warning {{messaging unqualified id}}
20 instantiate(myObject); // expected-note {{in instantiation}}
21}