[cfe-commits] r109261 - in /cfe/trunk/test/PCH: selector-warning.h selector-warning.m

Fariborz Jahanian fjahanian at apple.com
Fri Jul 23 13:32:58 PDT 2010


Author: fjahanian
Date: Fri Jul 23 15:32:57 2010
New Revision: 109261

URL: http://llvm.org/viewvc/llvm-project?rev=109261&view=rev
Log:
Test for selector-warning PCH patch.
radar 6507158.

Added:
    cfe/trunk/test/PCH/selector-warning.h
    cfe/trunk/test/PCH/selector-warning.m

Added: cfe/trunk/test/PCH/selector-warning.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/selector-warning.h?rev=109261&view=auto
==============================================================================
--- cfe/trunk/test/PCH/selector-warning.h (added)
+++ cfe/trunk/test/PCH/selector-warning.h Fri Jul 23 15:32:57 2010
@@ -0,0 +1,24 @@
+typedef struct objc_selector    *SEL;
+
+ at interface Foo 
+- (void) NotOK;
+ at end
+
+ at implementation Foo
+- (void) foo
+{
+  SEL a = @selector(b1ar); 
+  a = @selector(b1ar); 
+  a = @selector(bar);
+  a = @selector(ok);	// expected-warning {{unimplemented selector 'ok'}}
+  a = @selector(ok);
+  a = @selector(NotOK);	// expected-warning {{unimplemented selector 'NotOK'}}
+  a = @selector(NotOK);
+
+  a = @selector(clNotOk);	// expected-warning {{unimplemented selector 'clNotOk'}}
+
+  a = @selector (cl1);
+  a = @selector (cl2);
+  a = @selector (instNotOk);	// expected-warning {{unimplemented selector 'instNotOk'}}
+}
+ at end

Added: cfe/trunk/test/PCH/selector-warning.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/selector-warning.m?rev=109261&view=auto
==============================================================================
--- cfe/trunk/test/PCH/selector-warning.m (added)
+++ cfe/trunk/test/PCH/selector-warning.m Fri Jul 23 15:32:57 2010
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -x objective-c -emit-pch -o %t.h.pch %S/selector-warning.h
+// RUN: %clang_cc1 -include-pch %t.h.pch %s
+
+ at interface Bar 
++ (void) clNotOk;
+- (void) instNotOk;
++ (void) cl1;
+ at end
+
+ at implementation Bar
+- (void) bar {}
++ (void) cl1 {}
++ (void) cl2 {}
+ at end
+
+ at implementation Bar(CAT)
+- (void) b1ar {}
+ at end
+





More information about the cfe-commits mailing list