Open
Description
Bugzilla Link | 48026 |
Version | unspecified |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @zygoloid |
Extended Description
clang version 10.0.1 (https://github.com/llvm/llvm-project.git ef32c61)
options: -std=c++17 -O2 -pedantic-errors
clang++ rejects the following well-formed program:
struct A {
private:
~A();
public:
static A f();
};
A* foo() {
return new A(A::f());
}
On the return line no destructor is invoked or potentially invoked.