================
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning<
   InGroup<Availability>;
 
 def warn_unguarded_availability :
-  Warning<"%0 is only available on %1 %2 or newer">,
+  Warning<"%0 %select{is only|is not}5 available %select{|in %4 environment 
}3on %1 %2 %select{or newer|}5">,
----------------
hekota wrote:

If the API is available in higher version the warning will always be:

"%0 is only available on %1 %2 or newer"

The other formulation is only used when the API is not available in any future 
version for the target environment. This happens when there is an attribute 
narrowing down the availability to specific environment that is different from 
the current one. I kept the message under one ID so it can be turned on/off 
with `-Wunguarded-availability-new`.

https://github.com/llvm/llvm-project/pull/89809
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to