21 lines · c
1// RUN: %clang %s -fsyntax-only -std=c23 -M --embed-dir=%S/Inputs -Xclang -verify | FileCheck %s2 3// Yes this looks very strange indeed, but the goal is to test that we add4// files referenced by both __has_embed and #embed when we generate5// dependencies, so we're trying to see that both of these files are in the6// output.7#if __has_embed(<jk.txt>)8const char data =9#embed "Inputs/single_byte.txt"10;11_Static_assert('b' == data);12#else13#error "oops"14#endif15// expected-no-diagnostics16 17// CHECK: embed_dependencies.c \18// CHECK-NEXT: jk.txt \19// CHECK-NEXT: Inputs{{[/\\]}}single_byte.txt20 21