@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
}
return false;
}
+
+static void BuildFlattenedTypeList(QualType BaseTy,
+ llvm::SmallVectorImpl &List) {
+ llvm::SmallVector WorkList
@@ -6188,6 +6189,23 @@ static bool EvaluateBinaryTypeTrait(Sema &Self,
TypeTrait BTT, const TypeSourceI
TSTToBeDeduced->getTemplateName().getAsTemplateDecl(), RhsT,
Info) == TemplateDeductionResult::Success;
}
+ case BTT_IsScalarizedLayoutCompa
@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
}
return false;
}
+
+static void BuildFlattenedTypeList(QualType BaseTy,
+ llvm::SmallVectorImpl &List) {
+ llvm::SmallVector WorkList
@@ -6188,6 +6189,23 @@ static bool EvaluateBinaryTypeTrait(Sema &Self,
TypeTrait BTT, const TypeSourceI
TSTToBeDeduced->getTemplateName().getAsTemplateDecl(), RhsT,
Info) == TemplateDeductionResult::Success;
}
+ case BTT_IsScalarizedLayoutCompa
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/102227
>From 5361c74f0130839870dae2b84abd9d9e75cf787b Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Mon, 5 Aug 2024 13:22:47 -0500
Subject: [PATCH 1/3] [HLSL] Add __is_scalarized_layout_compatible
HLSL tends
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 a1af1de4380f9c4fa3b5229e9f4a41af93955c38
f1204453733faec7df428f6d6aa708c0b02db22b --e
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/102227
>From 5361c74f0130839870dae2b84abd9d9e75cf787b Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Mon, 5 Aug 2024 13:22:47 -0500
Subject: [PATCH 1/2] [HLSL] Add __is_scalarized_layout_compatible
HLSL tends
@@ -658,6 +658,9 @@ KEYWORD(out , KEYHLSL)
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) KEYWORD(Name, KEYHLSL)
#include "clang/Basic/HLSLIntangibleTypes.def"
+// HLSL Type traits.
+TYPE_TRAIT_2(__is_scalarized_layout_compatible, IsScalarizedLayou
@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
}
return false;
}
+
+static void BuildFlattenedTypeList(QualType BaseTy,
+ llvm::SmallVectorImpl &List) {
+ llvm::SmallVector WorkList
@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
}
return false;
}
+
+static void BuildFlattenedTypeList(QualType BaseTy,
+ llvm::SmallVectorImpl &List) {
+ llvm::SmallVector WorkList
llvm-beanz wrote:
> Is this the expected behaviour:
>
> ```c++
> struct EmptyPadding : Empty { Empty e; int X; };
> struct Repeated : Empty, DerivedEmpty { int X; }; // expected-warning
> {{inaccessible due to ambiguity}}
> _Static_assert(sizeof(EmptyPadding) == 8, "");
> _Static_assert(sizeof(
@@ -0,0 +1,132 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library
-finclude-default-header -verify %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library
-finclude-default-header -fnative-half-type -verify %s
+// expected-no-diagnostics
+
+// Case 1: How many w
@@ -0,0 +1,132 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library
-finclude-default-header -verify %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library
-finclude-default-header -fnative-half-type -verify %s
+// expected-no-diagnostics
+
+// Case 1: How many w
@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
}
return false;
}
+
+static void BuildFlattenedTypeList(QualType BaseTy,
+ llvm::SmallVectorImpl &List) {
+ llvm::SmallVector WorkList
@@ -1142,3 +1142,85 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
}
return false;
}
+
+static void BuildFlattenedTypeList(QualType BaseTy,
+ llvm::SmallVectorImpl &List) {
+ llvm::SmallVector WorkList
https://github.com/damyanp approved this pull request.
https://github.com/llvm/llvm-project/pull/102227
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
damyanp wrote:
> HLSL tends to rely pretty aggressively on scalarization occuring in the
> complier, which allows for some relaxed language behaviors when types are
> fully sclarized to equivalent scalar representations.
Some typos:
* occuring --> occurring
* complier --> compiler
* sclarized
MitalAshok wrote:
Is this the expected behaviour:
```c++
struct EmptyPadding : Empty { Empty e; int X; };
struct Repeated : Empty, DerivedEmpty { int X; }; // expected-warning
{{inaccessible due to ambiguity}}
_Static_assert(sizeof(EmptyPadding) == 8, "");
_Static_assert(sizeof(Repeated) == 8,
https://github.com/hekota approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/102227
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-hlsl
Author: Chris B (llvm-beanz)
Changes
HLSL tends to rely pretty aggressively on scalarization occuring in the
complier, which allows for some relaxed language behaviors when types are fully
sclarized to equivalent scalar representations.
This chan
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Chris B (llvm-beanz)
Changes
HLSL tends to rely pretty aggressively on scalarization occuring in the
complier, which allows for some relaxed language behaviors when types are fully
sclarized to equivalent scalar representations.
This cha
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/102227
HLSL tends to rely pretty aggressively on scalarization occuring in the
complier, which allows for some relaxed language behaviors when types are fully
sclarized to equivalent scalar representations.
This c
22 matches
Mail list logo