From bee6a761c245d4ecf6e9a9d16946ff8be40ed380 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Fri, 7 Jul 2017 09:15:29 +0000 Subject: [ObjC] Avoid the -Wunguarded-availability warnings for protocol requirements in protocol/class/category declarations The unguarded availability warnings in the protocol requirements of a protocol /class/category declaration can be avoided. This matches the behaviour of Swift's diagnostics. The warnings for deprecated/unavailable protocols are preserved. rdar://33156429 Differential Revision: https://reviews.llvm.org/D35061 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307368 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Sema/Sema.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 6911fb824a..31728a9f23 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -3900,8 +3900,9 @@ public: bool CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid); bool DiagnoseUseOfDecl(NamedDecl *D, SourceLocation Loc, - const ObjCInterfaceDecl *UnknownObjCClass=nullptr, - bool ObjCPropertyAccess=false); + const ObjCInterfaceDecl *UnknownObjCClass = nullptr, + bool ObjCPropertyAccess = false, + bool AvoidPartialAvailabilityChecks = false); void NoteDeletedFunction(FunctionDecl *FD); void NoteDeletedInheritingConstructor(CXXConstructorDecl *CD); std::string getDeletedOrUnavailableSuffix(const FunctionDecl *FD); -- cgit v1.2.3