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