Mercurial > hg > CbC > CbC_llvm
annotate clang/test/SemaObjC/warn-messaging-id.mm @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
rev | line source |
---|---|
150 | 1 // 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 | |
11 template<typename T> | |
12 void instantiate(const T &x) { | |
13 [x setThing: 22]; // expected-warning {{messaging unqualified id}} | |
14 } | |
15 | |
16 void 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 } |