diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2015-03-09 20:39:51 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2015-03-09 20:39:51 +0000 |
commit | 29dec576e62fe3e108474fd7a155ecd4ee49c8ff (patch) | |
tree | a8f727beee1e4794747e1c5f2c893fad8646f943 /clang/lib/Sema/SemaObjCProperty.cpp | |
parent | 8c4dfaa13bfb33f913c1c81741573813fd79081f (diff) | |
download | bcm5719-llvm-29dec576e62fe3e108474fd7a155ecd4ee49c8ff.tar.gz bcm5719-llvm-29dec576e62fe3e108474fd7a155ecd4ee49c8ff.zip |
[PATCH Sema Objective-C]. Patch to warn on missing designated initializer
override where at least a declaration of a designated initializer is in a super
class and not necessarily in the current class. rdar://19653785.
llvm-svn: 231700
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index f4f43360f5e..716fb50ea69 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -1894,9 +1894,11 @@ void Sema::DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D } void Sema::DiagnoseMissingDesignatedInitOverrides( - const ObjCImplementationDecl *ImplD, - const ObjCInterfaceDecl *IFD) { - assert(IFD->hasDesignatedInitializers()); + const ObjCImplementationDecl *ImplD) { + const ObjCInterfaceDecl *IFD = ImplD->getClassInterface(); + assert(IFD); + assert(IFD->hasDesignatedInitializers() || + IFD->hasDesignatedInitializersInSuperClass()); const ObjCInterfaceDecl *SuperD = IFD->getSuperClass(); if (!SuperD) return; |