This revision was automatically updated to reflect the committed changes.
Closed by commit rL306033: [Sema] Add -Wunguarded-availability-new (authored by
arphaman).
Changed prior to commit:
https://reviews.llvm.org/D34264?vs=103577&id=103598#toc
Repository:
rL LLVM
https://reviews.llvm.org/
erik.pilkington accepted this revision.
erik.pilkington added a comment.
This revision is now accepted and ready to land.
LGTM, thanks for working on this!
Repository:
rL LLVM
https://reviews.llvm.org/D34264
___
cfe-commits mailing list
cfe-commi
arphaman updated this revision to Diff 103577.
arphaman added a comment.
Update the logic for `-Wunguarded-availability -Wno-unguarded-availability-new`
so that it only warns for the old APIs.
Repository:
rL LLVM
https://reviews.llvm.org/D34264
Files:
include/clang/Basic/DiagnosticGroups.
dexonsmith added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:7031
+Introduced) &&
+!S.Diags.isIgnored(diag::warn_unguarded_availability_new, Loc);
+diag = NewWarning ? diag::warn_partial_availability_new
arphaman wrote:
> erik.p
arphaman added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:7031
+Introduced) &&
+!S.Diags.isIgnored(diag::warn_unguarded_availability_new, Loc);
+diag = NewWarning ? diag::warn_partial_availability_new
erik.pilkington wrote:
> S
erik.pilkington added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:7031
+Introduced) &&
+!S.Diags.isIgnored(diag::warn_unguarded_availability_new, Loc);
+diag = NewWarning ? diag::warn_partial_availability_new
Sorry to keep this
arphaman updated this revision to Diff 102902.
arphaman marked an inline comment as done.
arphaman added a comment.
Swap the checking operators and bring back the accidentally deleted code.
Repository:
rL LLVM
https://reviews.llvm.org/D34264
Files:
include/clang/Basic/DiagnosticGroups.td
arphaman added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:6944
-diag = !ObjCPropertyAccess ? diag::err_unavailable
- : diag::err_property_method_unavailable;
-diag_message = diag::err_unavailable_message;
erik.pil
erik.pilkington added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:6944
-diag = !ObjCPropertyAccess ? diag::err_unavailable
- : diag::err_property_method_unavailable;
-diag_message = diag::err_unavailable_message;
W
arphaman updated this revision to Diff 102891.
arphaman marked 2 inline comments as done.
arphaman added a comment.
Remove the assert and support the other partial availability warnings.
Repository:
rL LLVM
https://reviews.llvm.org/D34264
Files:
include/clang/Basic/DiagnosticGroups.td
in
erik.pilkington added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:7315
+ default:
+assert(!Triple.isMacOSX() && "MacOS should be handled in the switch");
+// New targets should always warn about availability.
This assert seems a bit redundant,
arphaman created this revision.
This patch adds a new warning flag called `-Wunguarded-availability-new`. If
`-Wunguarded-availability` is off, this warning only warns about uses of APIs
that have been introduced in macOS >= 10.13, iOS >= 11, watchOS >= 4 and tvOS
>= 11. This warning is on by d
12 matches
Mail list logo