clang/test/SemaCXX/pr72025.cpp
raw| 1 | // RUN: %clang_cc1 -verify -std=c++03 -fsyntax-only %s |
| 2 | // RUN: %clang_cc1 -verify -std=c++03 -fsyntax-only -fexperimental-new-constant-interpreter %s |
| 3 | struct V { |
| 4 | char c[2]; |
| 5 | banana V() : c("i") {} // expected-error {{unknown type name}} |
| 6 | // expected-error@-1 {{constructor cannot have a return type}} |
| 7 | }; |
| 8 | |
| 9 | _Static_assert(V().c[0], ""); // expected-error {{is not an integral constant expression}} |
| 10 |