diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-25 21:27:38 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2014-08-25 21:27:38 +0000 |
commit | effffaae3b5ebab5f3ee676e68f58cbd3ce9856a (patch) | |
tree | b9ce798ab06001375a98f737de7516d1f84dddb4 /test/SemaObjC/warn-explicit-call-initialize.m | |
parent | 884375bafb4cf93ede134791758eb02a4e91455f (diff) |
Objective-C. Allow [super initialize] in an +initialize
implementation but not anywhere else.
rdar://16628028
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/warn-explicit-call-initialize.m')
-rw-r--r-- | test/SemaObjC/warn-explicit-call-initialize.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/SemaObjC/warn-explicit-call-initialize.m b/test/SemaObjC/warn-explicit-call-initialize.m index 1c7baef15e..99fdf530af 100644 --- a/test/SemaObjC/warn-explicit-call-initialize.m +++ b/test/SemaObjC/warn-explicit-call-initialize.m @@ -2,11 +2,12 @@ // rdar://16628028 @interface NSObject -+ (void)initialize; // expected-note {{method 'initialize' declared here}} ++ (void)initialize; // expected-note 2 {{method 'initialize' declared here}} @end @interface I : NSObject + (void)initialize; // expected-note {{method 'initialize' declared here}} ++ (void)SomeRandomMethod; @end @implementation I @@ -17,5 +18,8 @@ + (void)initialize { [super initialize]; } ++ (void)SomeRandomMethod { // expected-note {{method 'SomeRandomMethod' declared here}} + [super initialize]; // expected-warning {{explicit call to [super initialize] should only be in implementation of +initialize}} +} @end |