mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

Summary: No new tests as the existing tests for result priority should give us coverage. Also as the new flag is trivial enough, I'm reluctant to plumb the flag to c-index-test output. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D53635 llvm-svn: 345135
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
// Note: the run lines follow their respective tests, since line/column
|
|
// matter in this test.
|
|
|
|
@protocol FooTestProtocol
|
|
+ protocolClassMethod;
|
|
- protocolInstanceMethod;
|
|
@end
|
|
@interface Foo <FooTestProtocol> {
|
|
void *isa;
|
|
}
|
|
+ (int)classMethod1:a withKeyword:b;
|
|
+ (void)classMethod2;
|
|
+ new;
|
|
- instanceMethod1;
|
|
@end
|
|
|
|
@interface Foo (FooTestCategory)
|
|
+ categoryClassMethod;
|
|
- categoryInstanceMethod;
|
|
@end
|
|
|
|
template<typename T> struct RetainPtr {
|
|
template <typename U> struct RemovePointer { typedef U Type; };
|
|
template <typename U> struct RemovePointer<U*> { typedef U Type; };
|
|
|
|
typedef typename RemovePointer<T>::Type* PtrType;
|
|
|
|
explicit operator PtrType() const;
|
|
};
|
|
|
|
void func(const RetainPtr<Foo>& ptr)
|
|
{
|
|
[ptr instanceMethod1];
|
|
}
|
|
|
|
void func(const RetainPtr<id <FooTestProtocol>>& ptr)
|
|
{
|
|
[ptr instanceMethod1];
|
|
}
|
|
|
|
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -code-completion-at=%s:33:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
|
|
// CHECK-CC1: categoryInstanceMethod : [#id#]categoryInstanceMethod
|
|
// CHECK-CC1: instanceMethod1 : [#id#]instanceMethod1
|
|
// CHECK-CC1: protocolInstanceMethod (InBase) : [#id#]protocolInstanceMethod
|
|
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -code-completion-at=%s:38:8 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
|
|
// CHECK-CC2: protocolInstanceMethod : [#id#]protocolInstanceMethod
|