1 // Note: the run lines follow their respective tests, since line/column
2 // matter in this test.
4 @protocol FooTestProtocol
6 - protocolInstanceMethod;
8 @interface Foo <FooTestProtocol> {
11 + (int)classMethod1:a withKeyword:b;
17 @interface Foo (FooTestCategory)
18 + categoryClassMethod;
19 - categoryInstanceMethod;
22 template<typename T> struct RetainPtr {
23 template <typename U> struct RemovePointer { typedef U Type; };
24 template <typename U> struct RemovePointer<U*> { typedef U Type; };
26 typedef typename RemovePointer<T>::Type* PtrType;
28 explicit operator PtrType() const;
31 void func(const RetainPtr<Foo>& ptr)
33 [ptr instanceMethod1];
36 void func(const RetainPtr<id <FooTestProtocol>>& ptr)
38 [ptr instanceMethod1];
41 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -code-completion-at=%s:%(line-8):8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
42 // CHECK-CC1: categoryInstanceMethod : [#id#]categoryInstanceMethod
43 // CHECK-CC1: instanceMethod1 : [#id#]instanceMethod1
44 // CHECK-CC1: protocolInstanceMethod (InBase) : [#id#]protocolInstanceMethod
45 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -code-completion-at=%s:%(line-7):8 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
46 // CHECK-CC2: protocolInstanceMethod : [#id#]protocolInstanceMethod