[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 30 03:40:46 PDT 2024


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 44a81af510801edce842e9574ec4d52cc7bd0ae9 5178a001cc3ce765e3d29e91e24597fa1b0f42d6 -- clang/test/CodeGenCXX/x86_32-vaarg.cpp clang/lib/CodeGen/Targets/X86.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/Targets/X86.cpp b/clang/lib/CodeGen/Targets/X86.cpp
index 2cb880752d..38143d1eed 100644
--- a/clang/lib/CodeGen/Targets/X86.cpp
+++ b/clang/lib/CodeGen/Targets/X86.cpp
@@ -1069,7 +1069,7 @@ Address X86_32ABIInfo::EmitVAArg(CodeGenFunction &CGF,
 
   auto TypeInfo = getContext().getTypeInfoInChars(Ty);
 
-  CCState State(*const_cast<CGFunctionInfo*>(CGF.CurFnInfo));
+  CCState State(*const_cast<CGFunctionInfo *>(CGF.CurFnInfo));
   ABIArgInfo AI = classifyArgumentType(Ty, State, /*ArgIndex*/ 0);
   // Empty records are ignored for parameter passing purposes.
   if (AI.isIgnore())

``````````

</details>


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


More information about the cfe-commits mailing list