[PATCH] D33816: [Sema][ObjC] Don't allow -Wunguarded-availability to be silenced with redeclarations

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 1 18:14:53 PDT 2017


erik.pilkington created this revision.

This patch drops support for suppressing -Wunguarded-availability with redeclarations. This was behavior left over from the -Wpartial-availability days, where it was the only way of silencing the diagnostic. Now that we have @available and better support for annotating contexts with availability attributes, this behavior should be dropped. 
This would emit warnings on code that used the old way of silencing the diagnostic, but this method:

- Didn't have many users; it was clunky to use
- Has a simple upgrade path that is mentioned in the diagnostics we emit
- Allows for availability violations to go undetected

@thakis: I know the chromium project uses this warning, is this OK with you?

rdar://32388777

Thanks for taking a look,
Erik


https://reviews.llvm.org/D33816

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDeclAttr.cpp
  lib/Sema/SemaExpr.cpp
  test/Sema/attr-availability.c
  test/Sema/attr-deprecated.c
  test/Sema/attr-unavailable-message.c
  test/SemaCXX/attr-deprecated.cpp
  test/SemaObjC/attr-availability.m
  test/SemaObjC/unguarded-availability.m

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33816.101152.patch
Type: text/x-patch
Size: 16025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170602/05e36caf/attachment.bin>


More information about the cfe-commits mailing list