[llvm-bugs] [Bug 45404] New: clang::no_destroy and clang::always_destroy should be applicable to types

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 2 12:38:55 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45404

            Bug ID: 45404
           Summary: clang::no_destroy and clang::always_destroy should be
                    applicable to types
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david at doublewise.net
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

There are attributes in clang that allow you to mark static variables as either
safe to skip static destruction (for instance, they just deallocate memory that
the OS will clean up for you) or unsafe to skip static destruction if
`-fno-c++-static-destructors` is passed.

This attribute should also be allowed on the type, setting the default for all
values of that type. It is almost exclusively a property of the type whether it
is safe to skip its destruction, not a property of any particular variable.
This would allow the type author to make that determination once and then all
of their users would benefit.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200402/327d3334/attachment.html>


More information about the llvm-bugs mailing list