diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2016-07-28 22:51:11 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2016-07-28 22:51:11 +0000 |
commit | 376789fc73554ed179fbb572e626c2fede092832 (patch) | |
tree | 74d63c4474bbd8702c27c0b59731f852d72067b4 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 21a9e573ed7c2582982344692f0c6e7ada9813eb (diff) | |
download | bcm5719-llvm-376789fc73554ed179fbb572e626c2fede092832.tar.gz bcm5719-llvm-376789fc73554ed179fbb572e626c2fede092832.zip |
Revert "[ObjC] Consider availability of context when emitting availability warnings"
Reverting r277058, while I fugure out why it broke internal bots.
This reverts commit e514ffa8b657416c6784bbe6da9f5de19365103d.
llvm-svn: 277070
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 287632382dd..73fd057a2a5 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -6484,26 +6484,3 @@ void Sema::EmitAvailabilityWarning(AvailabilityDiagnostic AD, DoEmitAvailabilityWarning(*this, AD, Ctx, D, Message, Loc, UnknownObjCClass, ObjCProperty, ObjCPropertyAccess); } - -VersionTuple Sema::getVersionForDecl(const Decl *D) const { - assert(D && "Expected a declaration here!"); - - VersionTuple DeclVersion; - if (const auto *AA = getAttrForPlatform(getASTContext(), D)) - DeclVersion = AA->getIntroduced(); - - const ObjCInterfaceDecl *Interface = nullptr; - - if (const auto *MD = dyn_cast<ObjCMethodDecl>(D)) - Interface = MD->getClassInterface(); - else if (const auto *ID = dyn_cast<ObjCImplementationDecl>(D)) - Interface = ID->getClassInterface(); - - if (Interface) { - if (const auto *AA = getAttrForPlatform(getASTContext(), Interface)) - if (AA->getIntroduced() > DeclVersion) - DeclVersion = AA->getIntroduced(); - } - - return DeclVersion; -} |