[clang] [HLSL] Handle `this` in dynamic resource indexing validation (PR #239876)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 22:38:26 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 64520 tests passed
* 844 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.CodeGenHLSL/resources/resources-in-structs-this-access.hlsl</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include -nostdsysteminc -triple dxil-pc-shadermodel6.0-compute -finclude-default-header -emit-llvm -disable-llvm-passes -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl | llvm-cxxfilt | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include -nostdsysteminc -triple dxil-pc-shadermodel6.0-compute -finclude-default-header -emit-llvm -disable-llvm-passes -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl
# note: command had no output on stdout or stderr
# executed command: llvm-cxxfilt
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl:5:11: error: CHECK: expected string not found in input
# | // CHECK: %"class.hlsl::RWBuffer" = type { target("dx.TypedBuffer", int, 1, 0, 0) }
# |           ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl'
# | ^
# | <stdin>:6:1: note: possible intended match here
# | %"class.hlsl::RWBuffer" = type { target("dx.TypedBuffer", i32, 1, 0, 1) }
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl' 
# | check:5'0    {                                                                                                                                                 search range start (exclusive)
# | check:5'1                                                                                                                                                      error: no match found in search range
# |            2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGenHLSL/resources/resources-in-structs-this-access.hlsl" 
# |            3: target datalayout = "e-m:e-ve-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" 
# |            4: target triple = "dxilv1.0-pc-shadermodel6.0-compute" 
# |            5:  
# |            6: %"class.hlsl::RWBuffer" = type { target("dx.TypedBuffer", i32, 1, 0, 1) } 
# | check:5'2     ?                                                                           possible intended match
# |            7: %struct.A = type { %"class.hlsl::RWBuffer" } 
# |            8:  
# |            9: @a.Buf = internal global %"class.hlsl::RWBuffer" poison, align 4 
# |           10: @.str = private unnamed_addr constant [6 x i8] c"a.Buf\00", align 1 
# |           11: @a = hidden global %struct.A zeroinitializer, align 4 
# |            .
# |            .
# |            .
# |          280:  
# |          281: !0 = !{i32 1, i32 8} 
# |          282: !1 = !{i32 4, !"dx.disable_optimizations", i32 1} 
# |          283: !2 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project a638d3f8eb64194dbd229454f8d2fc4faa7b19ab)"} 
# |          284: !3 = !{} 
# |          285: !4 = !{i64 4} 
# | check:5'3                   } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/239876


More information about the cfe-commits mailing list