[clang] [WIP] Advance the merger progress of #211963 (PR #216611)

via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 16 15:26:47 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 -- clang/lib/CodeGen/ItaniumCXXABI.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/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp
index cf37b040d..7ca789bf7 100644
--- a/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -3134,12 +3134,12 @@ void ItaniumCXXABI::registerGlobalDtor(CodeGenFunction &CGF, const VarDecl &D,
   // if (!CGM.getLangOpts().hasAtExit() && !D.isStaticLocal())
   //   return CGF.registerGlobalDtorWithLLVM(D, dtor, addr);
 
-  // If '-fno-use-cxa-atexit' and '-fno-register-global-dtors-with-atexit' are also sepcified,
-  // this means the user does not want any invocation to __cxa_atexit or atexit,
-  // but we still have to check if the declaration is static-local or thread-local,
-  // which should not be supported by this case.
-  // As we investigated, ELF has its .fini_array section to support the global destructors.
-  // So we can safely apply this to ELF.
+  // If '-fno-use-cxa-atexit' and '-fno-register-global-dtors-with-atexit' are
+  // also sepcified, this means the user does not want any invocation to
+  // __cxa_atexit or atexit, but we still have to check if the declaration is
+  // static-local or thread-local, which should not be supported by this case.
+  // As we investigated, ELF has its .fini_array section to support the global
+  // destructors. So we can safely apply this to ELF.
   if (!CGM.getLangOpts().hasAtExit() && !D.isStaticLocal() &&
       CGM.getTarget().getTriple().isOSBinFormatELF() &&
       !CGM.getCodeGenOpts().CXAAtExit &&

``````````

</details>


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


More information about the cfe-commits mailing list