make_unique.array3.fail.cpp 530 B

123456789101112131415161718
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #include <memory>
  9. #include <string>
  10. #include <cassert>
  11. int main(int, char**)
  12. {
  13. auto up3 = std::make_unique<int[5]>(); // this is deleted
  14. return 0;
  15. }