summaryrefslogtreecommitdiffstats
path: root/tests/preprocessor/circular-include/a.slang
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-10-10 17:31:01 -0700
committerGitHub <noreply@github.com>2025-10-11 00:31:01 +0000
commitfb34bafd37e3509d51686ee2a5392d2d8e29d7c5 (patch)
treeca16f2f53595d730319396320b21ad15fada7a06 /tests/preprocessor/circular-include/a.slang
parentc99addbf2e8a0210b97dad2827045dad95765d08 (diff)
Add diagnostic for cyclic #include. (#8679)
Diffstat (limited to 'tests/preprocessor/circular-include/a.slang')
-rw-r--r--tests/preprocessor/circular-include/a.slang7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/preprocessor/circular-include/a.slang b/tests/preprocessor/circular-include/a.slang
new file mode 100644
index 000000000..fe519dd12
--- /dev/null
+++ b/tests/preprocessor/circular-include/a.slang
@@ -0,0 +1,7 @@
+//TEST:SIMPLE(filecheck=CHECK): -target spirv
+
+// Test that we can diagnose an error when there is a circular include.
+
+// CHECK: error 15302: cyclic `#include` of file
+
+#include "b.slang" \ No newline at end of file