30 lines · c
1// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify2// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%S/Inputs -verify -fexperimental-new-constant-interpreter3// expected-no-diagnostics4 5typedef struct kitty {6 int purr;7} kitty;8 9typedef struct kitty_kitty {10 int here;11 kitty kit;12} kitty_kitty;13 14const int meow =15#embed <single_byte.txt>16;17 18const kitty kit = {19#embed <single_byte.txt>20};21 22const kitty_kitty kit_kit = {23#embed <jk.txt>24};25 26static_assert(meow == 'b');27static_assert(kit.purr == 'b');28static_assert(kit_kit.here == 'j');29static_assert(kit_kit.kit.purr == 'k');30