[clang] [HLSL] Add `__hlsl_resource_t` to types recognized by clang TableGen for built-in functions (PR #163465)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 14 15:35:08 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- clang/lib/AST/ASTContext.cpp clang/lib/Sema/SemaHLSL.cpp clang/lib/Sema/SemaOverload.cpp clang/utils/TableGen/ClangBuiltinsEmitter.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 4b59cd3c4..fb0ae2e54 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -1833,13 +1833,12 @@ TryImplicitConversion(Sema &S, Expr *From, QualType ToType,
       auto *ToResType = cast<HLSLAttributedResourceType>(ToTy);
       auto *FromResType = cast<HLSLAttributedResourceType>(FromTy);
       if (S.Context.hasSameUnqualifiedType(ToResType->getWrappedType(),
-                                          FromResType->getWrappedType()) &&
+                                           FromResType->getWrappedType()) &&
           S.Context.hasSameUnqualifiedType(ToResType->getContainedType(),
-                                          FromResType->getContainedType()) &&
+                                           FromResType->getContainedType()) &&
           ToResType->getAttrs() == FromResType->getAttrs())
         CanConvert = true;
-    }
-    else if (ToTy->isHLSLResourceType()) {
+    } else if (ToTy->isHLSLResourceType()) {
       CanConvert = true;
     }
     if (CanConvert) {

``````````

</details>


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


More information about the cfe-commits mailing list