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, no? ================ Comment at: lib/Sema/SemaDeclAttr.cpp:7350 + unsigned DiagKind = + !SemaRef.Diags.isIgnored(diag::warn_unguarded_availability_new, + Range.getBegin()) && ---------------- There is a version of this for decls that aren't referenced in a function, such as: ``` typedef int __attribute__((availability(macos, introducced=1000))) new_int; new_int x; // warn // Also: struct S { new_int x; // warn }; ``` -Wunguarded-availability-new should also work with this, right? If we do want to support that, maybe we should add this check to ShouldDiagnoseAvailabilityOfDecl(), which is called by both paths. Repository: rL LLVM https://reviews.llvm.org/D34264 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits