[flang-commits] [flang] [CUF] Fix CompilerGeneratedNamesConversion renaming managed companion globals (PR #198161)

via flang-commits flang-commits at lists.llvm.org
Sun May 17 02:40:33 PDT 2026


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 h,cpp -- flang/include/flang/Optimizer/Dialect/CUF/Attributes/CUFAttr.h flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp flang/lib/Optimizer/Transforms/CompilerGeneratedNames.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/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp b/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
index 892e0ccd3..2db2cd09b 100644
--- a/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
+++ b/flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
@@ -69,8 +69,7 @@ static fir::GlobalOp createManagedPointerGlobal(fir::FirOpBuilder &builder,
       /*isTarget=*/false, ptrTy, initAttr,
       /*linkName=*/builder.createInternalLinkage(), attrs);
 
-  ptrGlobal->setAttr(cuf::getManagedPtrAttrName(),
-                     mlir::UnitAttr::get(ctx));
+  ptrGlobal->setAttr(cuf::getManagedPtrAttrName(), mlir::UnitAttr::get(ctx));
 
   mlir::Region &region = ptrGlobal.getRegion();
   mlir::Block *block = builder.createBlock(&region);

``````````

</details>


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


More information about the flang-commits mailing list