[clang] [llvm] [ABI] Add CanBeFlattened to ArgInfo for Direct struct coerces (PR #220579)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 03:36:21 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 cpp,h -- llvm/unittests/ABI/FunctionInfoTest.cpp clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp llvm/include/llvm/ABI/FunctionInfo.h --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/CIR/Dialect/Transforms/CallConvLoweringPass.cpp b/clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
index 299adf5fd..4302b38e3 100644
--- a/clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+++ b/clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
@@ -578,7 +578,8 @@ convertABIArgInfo(const llvm::abi::ArgInfo &info, MLIRContext *ctx,
     // trip for nothing.
     if (comparesAgainstCoerce && coerced == origTy)
       return ArgClassification::getDirect();
-    ArgClassification classified = ArgClassification::getDirect(coerced, offset);
+    ArgClassification classified =
+        ArgClassification::getDirect(coerced, offset);
     classified.canFlatten = info.getCanBeFlattened();
     return classified;
   }

``````````

</details>


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


More information about the cfe-commits mailing list