diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-07-07 09:15:29 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-07-07 09:15:29 +0000 |
commit | cdd596fcdee060027ab841c8a93100bfe23ae968 (patch) | |
tree | e44179738bc38e5f01ddd3e6120e2b5f53e87f59 /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 906e9a18982a3f0d5074800799045d9d033c8e83 (diff) | |
download | bcm5719-llvm-cdd596fcdee060027ab841c8a93100bfe23ae968.tar.gz bcm5719-llvm-cdd596fcdee060027ab841c8a93100bfe23ae968.zip |
[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
llvm-svn: 307368
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 2c8080dbf02..778b8062f68 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -458,7 +458,10 @@ static void diagnoseUseOfProtocols(Sema &TheSema, // Diagnose availability in the context of the ObjC container. Sema::ContextRAII SavedContext(TheSema, CD); for (unsigned i = 0; i < NumProtoRefs; ++i) { - (void)TheSema.DiagnoseUseOfDecl(ProtoRefs[i], ProtoLocs[i]); + (void)TheSema.DiagnoseUseOfDecl(ProtoRefs[i], ProtoLocs[i], + /*UnknownObjCClass=*/nullptr, + /*ObjCPropertyAccess=*/false, + /*AvoidPartialAvailabilityChecks=*/true); } } |