diff options
author | Alex Lorenz <arphaman@gmail.com> | 2018-04-05 18:12:06 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2018-04-05 18:12:06 +0000 |
commit | 9c64f211b66179d077c17d6808025fcfc39a61a8 (patch) | |
tree | f36827fb911a252a599f439d5d2943b2a1ab4646 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 5e9059ceb1860071f55f7bbc6cb2f1aeb8ad75ae (diff) | |
download | bcm5719-llvm-9c64f211b66179d077c17d6808025fcfc39a61a8.tar.gz bcm5719-llvm-9c64f211b66179d077c17d6808025fcfc39a61a8.zip |
Remove the temporary availability checking workaround for
the nested declarations in @interface.
rdar://28825862
llvm-svn: 329324
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 1d2c3b55342..709ba377a4b 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -6828,28 +6828,6 @@ static bool ShouldDiagnoseAvailabilityInContext(Sema &S, AvailabilityResult K, return false; }; - // FIXME: This is a temporary workaround! Some existing Apple headers depends - // on nested declarations in an @interface having the availability of the - // interface when they really shouldn't: they are members of the enclosing - // context, and can referenced from there. - if (S.OriginalLexicalContext && cast<Decl>(S.OriginalLexicalContext) != Ctx) { - const auto *OrigCtx = cast<Decl>(S.OriginalLexicalContext); - if (CheckContext(OrigCtx)) - return false; - - // An implementation implicitly has the availability of the interface. - if (const auto *CatOrImpl = dyn_cast<ObjCImplDecl>(OrigCtx)) { - if (const ObjCInterfaceDecl *Interface = CatOrImpl->getClassInterface()) - if (CheckContext(Interface)) - return false; - } - // A category implicitly has the availability of the interface. - else if (const auto *CatD = dyn_cast<ObjCCategoryDecl>(OrigCtx)) - if (const ObjCInterfaceDecl *Interface = CatD->getClassInterface()) - if (CheckContext(Interface)) - return false; - } - do { if (CheckContext(Ctx)) return false; |