https://github.com/hekota closed 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
https://github.com/farzonl approved this pull request.
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
llvm-beanz wrote:
I think the different slice there is platform vs language. SemaHLSL should be
where HLSL tests go regardless of platform (DirectX or Vulkan), but we should
try to keep HLSL separate from C/C++ tests.
hekota wrote:
Right, and I am adding a lot more HLSL-specific tests in my upcoming PRs that
implement the diagnostic modes under the SemaHLSL directory. There is a number
of platform-specific tests for the availability attribute already here under
Sema
https://github.com/llvm-beanz commented:
A couple comments, but mostly this looks good to me.
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
llvm-beanz wrote:
nit: we've generally tried to keep the HLSL-specific tests separated from the
other language tests (i.e. SemaHLSL).
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
https://github.com/llvm-beanz edited
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
https://github.com/hekota edited 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
@@ -0,0 +1,140 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel5.0-compute -fsyntax-only
-verify %s
hekota wrote:
Done.
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
@@ -18,14 +18,21 @@ namespace hlsl {
#define _HLSL_BUILTIN_ALIAS(builtin)
\
__attribute__((clang_builtin_alias(builtin)))
-#define _HLSL_AVAILABILITY(environment, version)
\
-
@@ -0,0 +1,140 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel5.0-compute -fsyntax-only
-verify %s
farzonl wrote:
could we do different runs for pixel and mesh to cover their different version
availabilities from compute?
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/8] Add environment parameter to clang availability attribute
---
@@ -18,14 +18,21 @@ namespace hlsl {
#define _HLSL_BUILTIN_ALIAS(builtin)
\
__attribute__((clang_builtin_alias(builtin)))
-#define _HLSL_AVAILABILITY(environment, version)
\
-
@@ -18,14 +18,21 @@ namespace hlsl {
#define _HLSL_BUILTIN_ALIAS(builtin)
\
__attribute__((clang_builtin_alias(builtin)))
-#define _HLSL_AVAILABILITY(environment, version)
\
-
https://github.com/farzonl deleted
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
@@ -3861,11 +3864,17 @@ def warn_availability_fuchsia_unavailable_minor :
Warning<
InGroup;
def warn_unguarded_availability :
- Warning<"%0 is only available on %1 %2 or newer">,
+ Warning<"%0 is only available %select{|in %4 environment }3on %1 %2 or
newer">,
https://github.com/damyanp approved this pull request.
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
https://github.com/llvm-beanz commented:
Overall this looks good to me. One set of suggestions inline.
https://github.com/llvm/llvm-project/pull/89809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -772,40 +816,58 @@ void
DiagnoseUnguardedAvailability::DiagnoseDeclAvailability(
const AvailabilityAttr *AA =
getAttrForPlatform(SemaRef.getASTContext(), OffendingDecl);
+bool EnvironmentMatchesOrNone =
+
@@ -376,26 +400,46 @@ static void DoEmitAvailabilityWarning(Sema ,
AvailabilityResult K,
// not specified for deployment targets >= to iOS 11 or equivalent or
// for declarations that were introduced in iOS 11 (macOS 10.13, ...) or
// later.
-const
@@ -18,14 +18,21 @@ namespace hlsl {
#define _HLSL_BUILTIN_ALIAS(builtin)
\
__attribute__((clang_builtin_alias(builtin)))
-#define _HLSL_AVAILABILITY(environment, version)
\
-
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/7] Add environment parameter to clang availability attribute
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/7] Add environment parameter to clang availability attribute
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/7] Add environment parameter to clang availability attribute
---
hekota wrote:
Ping
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
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/6] Add environment parameter to clang availability attribute
---
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning<
InGroup;
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
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/5] Add environment parameter to clang availability attribute
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/4] Add environment parameter to clang availability attribute
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/3] Add environment parameter to clang availability attribute
---
llvm-beanz wrote:
> While I like the approach of aligning availability parameters closer to
> `llvm::Triple`, I am concerned about how this will interact with existing
> precedent. There is a lot of code that passes in _platform_ values that
> aren't actually `OSType`. For example
>
cyndyishida wrote:
> Overall I really like the direction of this. I'm curious if any of the
> maintainers from Apple have thoughts since they're the primary users of
> availability annotations.
While I like the approach of aligning availability parameters closer to
`llvm::Triple`, I am
@@ -1016,7 +1016,34 @@ static llvm::StringRef
canonicalizePlatformName(llvm::StringRef Platform) {
.Case("visionos_app_extension", "xros_app_extension")
.Case("ShaderModel", "shadermodel")
.Default(Platform);
-} }];
+}
+static
@@ -1016,7 +1016,34 @@ static llvm::StringRef
canonicalizePlatformName(llvm::StringRef Platform) {
.Case("visionos_app_extension", "xros_app_extension")
.Case("ShaderModel", "shadermodel")
.Default(Platform);
-} }];
+}
+static
https://github.com/Endilll commented:
`Sema.h` changes look good.
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
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning<
InGroup;
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
@@ -3859,7 +3862,7 @@ def warn_availability_fuchsia_unavailable_minor : Warning<
InGroup;
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
https://github.com/llvm-beanz edited
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
https://github.com/llvm-beanz commented:
Overall I really like the direction of this. I'm curious if any of the
maintainers from Apple have thoughts since they're the primary users of
availability annotations.
I think this dramatically simplifies things for what we need, but it might also
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-hlsl
Author: Helena Kotas (hekota)
Changes
Add `environment` parameter to Clang availability attribute. The allowed values
for this parameter are a subset of values allowed in the `llvm::Triple`
environment component. If the
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
Author: Helena Kotas (hekota)
Changes
Add `environment` parameter to Clang availability attribute. The allowed values
for this parameter are a subset of values allowed in the `llvm::Triple`
environment component. If the `environment`
https://github.com/hekota ready_for_review
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
https://github.com/hekota edited 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
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/3] Add environment parameter to clang availability attribute
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/3] Add environment parameter to clang availability attribute
---
https://github.com/hekota updated
https://github.com/llvm/llvm-project/pull/89809
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH 1/2] Add environment parameter to clang availability attribute
---
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 78eb2c2cba5ad0f9a36ec1959371527313a76bbe
22b67d30ca087d6a912183039c87fd1790eedfe4 --
https://github.com/hekota created
https://github.com/llvm/llvm-project/pull/89809
Fixes #89802
>From 22b67d30ca087d6a912183039c87fd1790eedfe4 Mon Sep 17 00:00:00 2001
From: Helena Kotas
Date: Tue, 23 Apr 2024 00:49:28 -0700
Subject: [PATCH] Add environment parameter to clang availability
48 matches
Mail list logo