| 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++14 |
| 2 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++17 -pedantic |
| 3 | |
| 4 | void f() { |
| 5 | new auto('a'); |
| 6 | new auto {2}; |
| 7 | new auto {1, 2}; // expected-error{{new expression for type 'auto' contains multiple constructor arguments}} |
| 8 | new auto {}; // expected-error{{new expression for type 'auto' requires a constructor argument}} |
| 9 | new decltype(auto)({1}); |
| 10 | new decltype(auto)({1, 2}); // expected-error{{new expression for type 'decltype(auto)' contains multiple constructor arguments}} |
| 11 | } |
| 12 | |