summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaObjC/class-extension-dup-methods.m12
-rw-r--r--clang/test/SemaObjC/property-in-class-extension.m7
2 files changed, 15 insertions, 4 deletions
diff --git a/clang/test/SemaObjC/class-extension-dup-methods.m b/clang/test/SemaObjC/class-extension-dup-methods.m
index 5f463aed168..446d2be0378 100644
--- a/clang/test/SemaObjC/class-extension-dup-methods.m
+++ b/clang/test/SemaObjC/class-extension-dup-methods.m
@@ -26,3 +26,15 @@ __attribute__((objc_root_class)) @interface AppDelegate
- (void)someMethodWithArgument:(float)argument; // OK. No warning to be issued here.
+ (void)someMethodWithArgument:(float)argument : (float)argument2; // expected-error {{duplicate declaration of method 'someMethodWithArgument::'}}
@end
+
+__attribute__((objc_root_class))
+@interface Test
+-(void)meth; // expected-note {{declared here}}
+@end
+
+@interface Test()
+-(void)meth;
+@end
+
+@implementation Test // expected-warning {{method definition for 'meth' not found}}
+@end
diff --git a/clang/test/SemaObjC/property-in-class-extension.m b/clang/test/SemaObjC/property-in-class-extension.m
index 022a487ec6d..a780a352199 100644
--- a/clang/test/SemaObjC/property-in-class-extension.m
+++ b/clang/test/SemaObjC/property-in-class-extension.m
@@ -37,12 +37,11 @@ void FUNC () {
@interface rdar8747333 ()
- (NSObject *)bam;
-- (NSObject *)warn; // expected-note {{method 'warn' declared here}}
-- (void)setWarn : (NSObject *)val; // expected-note {{method 'setWarn:' declared here}}
+- (NSObject *)warn;
+- (void)setWarn : (NSObject *)val;
@end
-@implementation rdar8747333 // expected-warning {{method definition for 'warn' not found}} \
- // expected-warning {{method definition for 'setWarn:' not found}}
+@implementation rdar8747333
@synthesize bar = _bar;
@synthesize baz = _baz;
@synthesize bam = _bam;
OpenPOWER on IntegriCloud