[flang-commits] [flang] [flang] [cuda] Move SetImplicityCUDADevice after symbols in block construct are converted to objects (PR #143791)

via flang-commits flang-commits at lists.llvm.org
Thu Jun 12 14:38:07 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 HEAD~1 HEAD --extensions cpp -- flang/lib/Semantics/resolve-names.cpp
``````````

</details>

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

``````````diff
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index dc1322809..e23e91b67 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -2830,7 +2830,8 @@ Scope &ScopeHandler::NonDerivedTypeScope() {
 
 static void SetImplicitCUDADevice(Symbol &symbol) {
   if (auto *object{symbol.detailsIf<ObjectEntityDetails>()}) {
-    if (!object->cudaDataAttr() && !IsValue(symbol) && !IsFunctionResult(symbol)) {
+    if (!object->cudaDataAttr() && !IsValue(symbol) &&
+        !IsFunctionResult(symbol)) {
       // Implicitly set device attribute if none is set in device context.
       object->set_cudaDataAttr(common::CUDADataAttr::Device);
     }

``````````

</details>


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


More information about the flang-commits mailing list