]> granicus.if.org Git - clang/commitdiff
Test for my last patch.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 3 May 2010 21:06:59 +0000 (21:06 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 3 May 2010 21:06:59 +0000 (21:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102956 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjCXX/overload-1.mm [new file with mode: 0644]

diff --git a/test/SemaObjCXX/overload-1.mm b/test/SemaObjCXX/overload-1.mm
new file mode 100644 (file)
index 0000000..fc17ca2
--- /dev/null
@@ -0,0 +1,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> *) { }