summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 3198b01949d..ca4d20c0994 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -392,11 +392,14 @@ void Sema::ActOnStartOfObjCMethodDef(Scope *FnBodyScope, Decl *D) {
if (MDecl->getMethodFamily() == OMF_init) {
if (MDecl->isDesignatedInitializerForTheInterface()) {
getCurFunction()->ObjCIsDesignatedInit = true;
- getCurFunction()->ObjCWarnForNoDesignatedInitChain =
+ // Don't issue this warning for unavaialable inits.
+ if (!MDecl->isUnavailable())
+ getCurFunction()->ObjCWarnForNoDesignatedInitChain =
IC->getSuperClass() != 0;
} else if (IC->hasDesignatedInitializers()) {
getCurFunction()->ObjCIsSecondaryInit = true;
- getCurFunction()->ObjCWarnForNoInitDelegation = true;
+ // Don't issue this warning for unavaialable inits.
+ getCurFunction()->ObjCWarnForNoInitDelegation = !MDecl->isUnavailable();
}
}
OpenPOWER on IntegriCloud