[clang] [clang] Disable C++14 sized deallocation by default for MinGW targets (PR #97232)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 30 14:01:25 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 4997af98a008e71a3df61707559710d1c2769839 424eb0ff6b32abcb4eede92c1b2f78a32d3b37a6 -- clang/lib/Driver/ToolChains/MinGW.cpp clang/unittests/StaticAnalyzer/CallEventTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Driver/ToolChains/MinGW.cpp b/clang/lib/Driver/ToolChains/MinGW.cpp
index 945863a4a8..c81a7ed170 100644
--- a/clang/lib/Driver/ToolChains/MinGW.cpp
+++ b/clang/lib/Driver/ToolChains/MinGW.cpp
@@ -731,19 +731,21 @@ void toolchains::MinGW::addClangTargetOptions(
//
// If using sized deallocation, user code that invokes delete will end up
// calling delete(void*,size_t). If the user wanted to override the
- // operator delete(void*), there may be a fallback operator delete(void*,size_t)
- // which calls the regular operator delete(void*).
+ // operator delete(void*), there may be a fallback operator
+ // delete(void*,size_t) which calls the regular operator delete(void*).
//
// However, if the C++ standard library is linked in the form of a DLL,
// and the fallback operator delete(void*,size_t) is within this DLL (which is
- // the case for libc++ at least) it will only redirect towards the library's default
- // operator delete(void*), not towards the user's provided operator delete(void*).
+ // the case for libc++ at least) it will only redirect towards the library's
+ // default operator delete(void*), not towards the user's provided operator
+ // delete(void*).
//
// This issue can be avoided, if the fallback operators are linked statically
// into the callers, even if the C++ standard library is linked as a DLL.
//
- // This is meant as a temporary workaround until libc++ implements this technique,
- // which is tracked in https://github.com/llvm/llvm-project/issues/96899.
+ // This is meant as a temporary workaround until libc++ implements this
+ // technique, which is tracked in
+ // https://github.com/llvm/llvm-project/issues/96899.
if (!DriverArgs.hasArgNoClaim(options::OPT_fsized_deallocation,
options::OPT_fno_sized_deallocation))
CC1Args.push_back("-fno-sized-deallocation");
``````````
</details>
https://github.com/llvm/llvm-project/pull/97232
More information about the cfe-commits
mailing list