[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-16 Thread Finn Plummer via cfe-commits
@@ -2576,3 +2576,162 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } + +static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E, +llvm::SmallVectorImpl &List, +llvm::SmallVectorImpl &DestT

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-16 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,69 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -finclude-default-header -verify -Wdouble-promotion -Wconversion %s + +struct TwoFloats { + float X, Y; +}; + +struct TwoInts { + int Z, W; +}; + +struct Doggo { + int4 LegState; + int TailState; + f

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-16 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,69 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -finclude-default-header -verify -Wdouble-promotion -Wconversion %s + +struct TwoFloats { + float X, Y; +}; + +struct TwoInts { + int Z, W; +}; + +struct Doggo { + int4 LegState; + int TailState; + f

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-16 Thread Chris B via cfe-commits
llvm-beanz wrote: A couple notes for myself: * I need to write some AST tests * Also need to write tests to cover bit fields and unions. https://github.com/llvm/llvm-project/pull/123141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-15 Thread via cfe-commits
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 6ffc4451037bbae26cce51fb80418f8e9ed2ac84 8457635e366f791d03604384c232bc3d270ce0f8 --e

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/123141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This PR implements HLSL's initialization list behvaior as specified in the draft language specifcation under [*Decl.Init.Agg*](https://microsoft.github.io/hlsl-specs/specs/hlsl.html #Decl.Init.Agg). This beha

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes This PR implements HLSL's initialization list behvaior as specified in the draft language specifcation under [*Decl.Init.Agg*](https://microsoft.github.io/hlsl-specs/specs/hlsl.html #Decl.Init.Agg). This behav

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-01-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/123141 This PR implements HLSL's initialization list behvaior as specified in the draft language specifcation under [*Decl.Init.Agg*](https://microsoft.github.io/hlsl-specs/specs/hlsl.html #Decl.Init.Agg). This be