[clang] [[clang::always_destroy]] attribute silences warn-exit-time-destructor (PR #86486)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 05:35:57 PDT 2024
================
@@ -6069,6 +6069,9 @@ def AlwaysDestroyDocs : Documentation {
The ``always_destroy`` attribute specifies that a variable with static or thread
storage duration should have its exit-time destructor run. This attribute is the
default unless clang was invoked with -fno-c++-static-destructors.
+
+If a variable is explicitly declared with this attribute, Clang will silence
+otherwise applicable ``-Wexit-time-destructor`` warnings.
----------------
AaronBallman wrote:
```suggestion
otherwise applicable ``-Wexit-time-destructors`` warnings.
```
https://github.com/llvm/llvm-project/pull/86486
More information about the cfe-commits
mailing list