[clang] [Clang][HLSL] Add environment parameter to availability attribute (PR #89809)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 25 18:01:45 PDT 2024
================
@@ -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">,
----------------
llvm-beanz wrote:
It looks like the change here is to make two different formulations of this warning one is saying:
"%0 is only available on %1 %2 or newer"
The other is saying:
"%0 is not available on %1 %2"
I think the original warning has the benefit of conveying what version the API becomes available, which gives more direct meaningful feedback to the user.
Since we don't have an existing warning text to try and match for HLSL, can we try and align with the existing warning text?
https://github.com/llvm/llvm-project/pull/89809
More information about the cfe-commits
mailing list