Debian Codegraph @

clang/test/SemaCXX/GH82167.cpp

raw
1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++23 -fsyntax-only -verify -xobjective-c++ %s
2 // expected-no-diagnostics
3
4 namespace 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 t1
16
17 namespace 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 t2