[llvm-bugs] [Bug 30898] New: libc++ should (behind a macro that can enable and disable) add [[nodiscard]] unique_ptr::release

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 3 10:45:12 PDT 2016


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

            Bug ID: 30898
           Summary: libc++ should (behind a macro that can enable and
                    disable) add [[nodiscard]] unique_ptr::release
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chandlerc at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

We have a C++ annotation ([[nodiscard]]) which allows warnings when returned
values are ignored. This should be possible to enable on
std::unique_ptr<...>::release()'s returned pointer so that we don't
accidentally leak memory.

-- 
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/20161103/b49bac44/attachment.html>


More information about the llvm-bugs mailing list