[all-commits] [llvm/llvm-project] b509eb: [HLSL] add IsTypedResourceElementCompatible type t...

Joshua Batista via All-commits all-commits at lists.llvm.org
Tue Nov 5 10:05:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b509eb7740b3300b79b90f8a43c374e28d13dc48
      https://github.com/llvm/llvm-project/commit/b509eb7740b3300b79b90f8a43c374e28d13dc48
  Author: Joshua Batista <jbatista at microsoft.com>
  Date:   2024-11-05 (Tue, 05 Nov 2024)

  Changed paths:
    M clang/include/clang/Basic/TokenKinds.def
    M clang/include/clang/Sema/SemaHLSL.h
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    A clang/test/SemaHLSL/Types/Traits/IsTypedResourceElementCompatible.hlsl
    A clang/test/SemaHLSL/Types/Traits/IsTypedResourceElementCompatibleErrors.hlsl

  Log Message:
  -----------
  [HLSL] add IsTypedResourceElementCompatible type trait  (#114864)

This PR implements a new type trait as a builtin,
__builtin_hlsl_is_typed_resource_element_compatible
This type traits verifies that the given input type is suitable as a
typed resource element type.
It checks that the given input type is homogeneous, has no more than 4
sub elements, does not exceed 16 bytes, and does not contain any arrays,
booleans, or enums.
Fixes an issue in https://github.com/llvm/llvm-project/pull/113730 that
needed to cause that PR to be reverted.
Fixes https://github.com/llvm/llvm-project/issues/113223



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