[clang] [HLSL] Fix global resource initialization (PR #123394)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 17 12:48:32 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 8fa0f0efce5fb81eb422e6d7eec74c66dafef4a3 1d04bfa8e1b138a13acf30c3fc46428d3b260569 --extensions cpp,h -- clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CGHLSLRuntime.cpp clang/lib/CodeGen/CGHLSLRuntime.h clang/lib/CodeGen/CodeGenModule.h
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CGHLSLRuntime.cpp b/clang/lib/CodeGen/CGHLSLRuntime.cpp
index c01416bcd3..e262a99403 100644
--- a/clang/lib/CodeGen/CGHLSLRuntime.cpp
+++ b/clang/lib/CodeGen/CGHLSLRuntime.cpp
@@ -602,7 +602,8 @@ void CGHLSLRuntime::handleGlobalVarDefinition(const VarDecl *VD,
   // for the resource
   const HLSLResourceBindingAttr *RBA = VD->getAttr<HLSLResourceBindingAttr>();
   if (!RBA)
-    // FIXME: collect unbound resources for implicit binding resolution later on?
+    // FIXME: collect unbound resources for implicit binding resolution later
+    // on?
     return;
 
   if (!isResourceRecordType(VD->getType().getTypePtr()))

``````````

</details>


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


More information about the cfe-commits mailing list