summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2015-03-09 20:39:51 +0000
committerFariborz Jahanian <fjahanian@apple.com>2015-03-09 20:39:51 +0000
commit29dec576e62fe3e108474fd7a155ecd4ee49c8ff (patch)
treea8f727beee1e4794747e1c5f2c893fad8646f943 /clang/lib/Sema/SemaObjCProperty.cpp
parent8c4dfaa13bfb33f913c1c81741573813fd79081f (diff)
downloadbcm5719-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.cpp8
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;
OpenPOWER on IntegriCloud