[clang] [HLSL] cbuffer: Create host layout structs (PR #122820)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 23 00:03:43 PST 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 ffe5cddb68ab84348866b3a3ac727d263b2a44c2 80fc426305ace181d6ad44cf09e5896592b591c7 --extensions cpp -- clang/lib/Sema/SemaHLSL.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Sema/SemaHLSL.cpp b/clang/lib/Sema/SemaHLSL.cpp
index 1a8ae295e8..6edca32204 100644
--- a/clang/lib/Sema/SemaHLSL.cpp
+++ b/clang/lib/Sema/SemaHLSL.cpp
@@ -274,11 +274,10 @@ static bool isResourceRecordType(const Type *Ty) {
   return HLSLAttributedResourceType::findHandleTypeOnResource(Ty) != nullptr;
 }
 
-// Returns true if the type is a leaf element type that is not valid to be included
-// in HLSL Buffer, such as a resource class, empty struct, zero-sized array,
-// or a builtin intangible type.
-// Returns false it is a valid leaf element type or if it is a record type that
-// needs to be inspected further.
+// Returns true if the type is a leaf element type that is not valid to be
+// included in HLSL Buffer, such as a resource class, empty struct, zero-sized
+// array, or a builtin intangible type. Returns false it is a valid leaf element
+// type or if it is a record type that needs to be inspected further.
 static bool isInvalidConstantBufferLeafElementType(const Type *Ty) {
   if (Ty->isRecordType()) {
     if (isResourceRecordType(Ty) || Ty->getAsCXXRecordDecl()->isEmpty())

``````````

</details>


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


More information about the cfe-commits mailing list