[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-22 Thread Alex Lorenz via Phabricator via cfe-commits
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/

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-22 Thread Erik Pilkington via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-22 Thread Alex Lorenz via Phabricator via cfe-commits
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.

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-19 Thread Erik Pilkington via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-16 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-16 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-16 Thread Erik Pilkington via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-16 Thread Alex Lorenz via Phabricator via cfe-commits
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

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-15 Thread Erik Pilkington via Phabricator via cfe-commits
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,

[PATCH] D34264: Introduce -Wunguarded-availability-new, which is like -Wunguarded-availability, except that it's enabled by default for new deployment targets

2017-06-15 Thread Alex Lorenz via Phabricator via cfe-commits
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