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

Erik Pilkington via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 19 09:30:30 PDT 2017

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 going so long, but why are we even checking isIgnored? The only difference it could make in whether we emit a diagnostic is if both: -Wunguarded-availability and -Wno-unguarded-availability-new are passed in, which seems like it would never happen, right? Even if somebody did pass that in, it seems reasonable to warn on old stuff but not new stuff. Maybe I'm missing something here?



More information about the cfe-commits mailing list