bolt/deps/llvm-18.1.8/clang/test/SemaCXX/pr72025.cpp
2025-02-14 19:21:04 +01:00

9 lines
328 B
C++

// RUN: %clang_cc1 -verify -std=c++03 -fsyntax-only %s
struct V {
char c[2];
banana V() : c("i") {} // expected-error {{unknown type name}}
// expected-error@-1 {{constructor cannot have a return type}}
};
_Static_assert(V().c[0], ""); // expected-error {{is not an integral constant expression}}