]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaObjCXX/instantiate-method-return.mm
Vendor import of clang trunk r338150:
[FreeBSD/FreeBSD.git] / test / SemaObjCXX / instantiate-method-return.mm
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2 // PR7386
3
4 @class NSObject;
5
6 class A; // expected-note {{forward declaration of 'A'}}
7 template<class T> class V { T x; }; // expected-error {{field has incomplete type 'A'}}
8
9 @protocol Protocol
10 - (V<A*>)protocolMethod;
11 - (V<A>)method2;
12 @end
13
14
15 @interface I<Protocol>
16 @end
17
18
19 @implementation I
20 - (void)randomMethod:(id)info {
21   V<A*> vec([self protocolMethod]);
22 }
23
24 - (V<A*>)protocolMethod {
25   V<A*> va; return va;
26 }
27 - (V<A>)method2 { // expected-note {{in instantiation of}}
28 }
29 @end