[all-commits] [llvm/llvm-project] 9a82f7: [HLSL][NFC] Refactor HLSLExternalSemaSource (#131032)

Helena Kotas via All-commits all-commits at lists.llvm.org
Mon Mar 24 14:56:26 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a82f742b4976650827674e58c3c2b0b412b56f0
      https://github.com/llvm/llvm-project/commit/9a82f742b4976650827674e58c3c2b0b412b56f0
  Author: Helena Kotas <hekotas at microsoft.com>
  Date:   2025-03-24 (Mon, 24 Mar 2025)

  Changed paths:
    M clang/include/clang/Sema/HLSLExternalSemaSource.h
    M clang/lib/Sema/CMakeLists.txt
    A clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
    A clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.h
    M clang/lib/Sema/HLSLExternalSemaSource.cpp

  Log Message:
  -----------
  [HLSL][NFC] Refactor HLSLExternalSemaSource (#131032)

Moving builder classes into separate files
`HLSLBuiltinTypeDeclBuilder.cpp`/`.h`, changing a some
`HLSLExternalSemaSource` methods to private and removing unused methods.

This is a prep work before we start adding more builtin types and
methods, like textures, resource constructors or matrices. For example
constructors could make use of the `BuiltinTypeMethodBuilder`, but this
helper class was defined in `HLSLExternalSemaSource.cpp` after the
method that creates a constructor. Rather than reshuffling the code one
big source file I am moving the builders into a separate cpp & header
file and placing the helper classes declarations up top.

Currently the new header only exposes `BuiltinTypeDeclBuilder` to
`HLSLExternalSemaSource`. In the future but we might decide to expose
more helper classes as needed.



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