[all-commits] [llvm/llvm-project] 1a3c73: [HLSL] Add globals for resources embedded in structs

Helena Kotas via All-commits all-commits at lists.llvm.org
Wed Mar 4 18:37:09 PST 2026


  Branch: refs/heads/users/hekota/pr184281-res-in-structs-sema
  Home:   https://github.com/llvm/llvm-project
  Commit: 1a3c736dbe5b44fb2497b29d7f4b853ab5bf280f
      https://github.com/llvm/llvm-project/commit/1a3c736dbe5b44fb2497b29d7f4b853ab5bf280f
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2026-03-02 (Mon, 02 Mar 2026)

  Changed paths:
    M clang/include/clang/AST/HLSLResource.h
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Sema/SemaHLSL.h
    M clang/lib/AST/CMakeLists.txt
    A clang/lib/AST/HLSLResource.cpp
    M clang/lib/Sema/SemaExprMember.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    A clang/test/AST/HLSL/resources-in-structs-errors.hlsl
    A clang/test/AST/HLSL/resources-in-structs.hlsl

  Log Message:
  -----------
  [HLSL] Add globals for resources embedded in structs

For each resource or resource array member of a struct declared
at global scope or inside a cbuffer, create an implicit global
variable of the same resource type. The variable name will be
derived from the struct instance name and the member name.

The new global is associated with the struct declaration using
a new attribute HLSLAssociatedResourceDeclAttr.

Closes #182988


  Commit: 908782fafbd03905482d239c285047d1fe2df6a7
      https://github.com/llvm/llvm-project/commit/908782fafbd03905482d239c285047d1fe2df6a7
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2026-03-02 (Mon, 02 Mar 2026)

  Changed paths:
    M clang/lib/Sema/SemaHLSL.cpp

  Log Message:
  -----------
  Reorder and format


  Commit: 64141ab75a2554da799392fc4eada65d32b8c263
      https://github.com/llvm/llvm-project/commit/64141ab75a2554da799392fc4eada65d32b8c263
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2026-03-03 (Tue, 03 Mar 2026)

  Changed paths:
    M clang/lib/Sema/SemaHLSL.cpp

  Log Message:
  -----------
  Add comments, update asserts


Compare: https://github.com/llvm/llvm-project/compare/1a3c736dbe5b%5E...64141ab75a25

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list