https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101236
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- You can use incomplete types with std::unique_ptr<T> but the array specialization, std::unique_ptr<T[]>, requires T to be a complete type. See [unique.ptr.runtime.general] p3 in the C++ standard. That requirement has been there since std::unique_ptr<T[]> was added in C++11. So the code is invalid. LLVM needs to ensure the type is complete, or not use std::unique_ptr<T[]> there.