summaryrefslogtreecommitdiff
path: root/test/SemaObjC/call-super-2.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/call-super-2.m')
-rw-r--r--test/SemaObjC/call-super-2.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaObjC/call-super-2.m b/test/SemaObjC/call-super-2.m
index a481cffd2886d..afd35a8e26308 100644
--- a/test/SemaObjC/call-super-2.m
+++ b/test/SemaObjC/call-super-2.m
@@ -6,6 +6,7 @@ typedef struct objc_object *id;
id objc_getClass(const char *s);
@interface Object
+- (id) initWithInt: (int) i;
@end
@protocol Func
@@ -28,6 +29,7 @@ id objc_getClass(const char *s);
- (int) instance_func5;
- (int) instance_func6;
- (int) instance_func7;
+- (id) initWithInt: (int) i;
@end
@implementation Derived
@@ -94,5 +96,13 @@ id objc_getClass(const char *s);
{
return [objc_getClass("Derived") class_func1];
}
+- (id) initWithInt: (int) i
+{
+ // Don't warn about parentheses here.
+ if (self = [super initWithInt: i]) {
+ [self instance_func1];
+ }
+ return self;
+}
@end