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

            Bug ID: 47474
           Summary: Destroying delete requires accessible destructor
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangb...@nondot.org
          Reporter: barry.rev...@gmail.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

>From StackOverflow (https://stackoverflow.com/q/63797383/2069064):

#include <new>

struct S {
    void operator delete(S* p, std::destroying_delete_t);

private:
    ~S();
};

void f() {
    delete new S;
}

This fails to compile on clang, which requires the destructor of S to be
accessible. But nothing here invokes the destructor of S (presumably the
destroying delete would), so this should compile fine.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to