29 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++23 -fsyntax-only -verify -xobjective-c++ %s2// expected-no-diagnostics3 4namespace t1 {5 struct array {6 char elems[2];7 };8 9 template <unsigned> struct Literal {10 array arr;11 constexpr Literal() : arr("") {}12 };13 14 template struct Literal<0>;15} // namespace t116 17namespace t2 {18 struct array {19 char elems[2];20 };21 22 template <unsigned> struct Literal {23 array arr;24 constexpr Literal() : arr(@encode(int)) {}25 };26 27 template struct Literal<0>;28} // namespace t229