summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjCXX/overload-1.mm
blob: fc17ca2be98d0da8338cb2391a73d41b273cceb7 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: %clang_cc1 -fsyntax-only -verify %s

@protocol Proto1 @end

@protocol Proto2 @end

void f(id<Proto1> *) { }		// expected-note {{previous definition is here}}

void f(id<Proto1, Proto2> *) { }	// expected-error {{conflicting types for 'f'}}

void f(Class<Proto1> *) { }		// expected-note {{previous definition is here}}

void f(Class<Proto1, Proto2> *) { }	// expected-error {{conflicting types for 'f'}}

@interface I @end

void f(I<Proto1> *) { }		// expected-note {{previous definition is here}}

void f(I<Proto1, Proto2> *) { }		// expected-error {{conflicting types for 'f'}}

@interface I1 @end

void f1(I<Proto1> *) { }

void f1(I1<Proto1, Proto2> *) { }