Another test for r157025 <rdar://problem/11460990>.
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 18 May 2012 00:19:25 +0000 (00:19 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 18 May 2012 00:19:25 +0000 (00:19 +0000)
llvm-svn: 157034

clang/test/SemaObjC/mismatched-undefined-method.m [new file with mode: 0644]

diff --git a/clang/test/SemaObjC/mismatched-undefined-method.m b/clang/test/SemaObjC/mismatched-undefined-method.m
new file mode 100644 (file)
index 0000000..936e892
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1  -fsyntax-only -verify %s
+// rdar://11460990
+
+typedef unsigned int CGDirectDisplayID;
+
+@interface NSObject @end
+
+@interface BrightnessAssistant : NSObject {}
+- (void)BrightnessAssistantUnregisterForNotifications:(void*) observer; // expected-note {{previous definition is here}}
+@end
+@implementation BrightnessAssistant // expected-note {{implementation started here}}
+- (void)BrightnessAssistantUnregisterForNotifications:(CGDirectDisplayID) displayID, void* observer // expected-warning {{conflicting parameter types in implementation of 'BrightnessAssistantUnregisterForNotifications:': 'void *' vs 'CGDirectDisplayID'}}
+@end // expected-error {{expected method body}} // expected-error {{missing '@end'}}