summaryrefslogtreecommitdiff
path: root/tests/diagnostics/nested-pragma-main.slang
diff options
context:
space:
mode:
authorCopilot <198982749+Copilot@users.noreply.github.com>2025-08-04 17:13:19 -0700
committerGitHub <noreply@github.com>2025-08-05 00:13:19 +0000
commit301ffb1944a01d33d0b82c135f3c4a86e80fde2e (patch)
tree94d0f6f6253ed21c17150f03cd5c421a66824435 /tests/diagnostics/nested-pragma-main.slang
parent41314741d9bfca95abba40e58720b4ce2f2653dd (diff)
Fix #pragma warning not working with multifile modules (#7942)
* Initial plan * Fix pragma warning not working with multifile modules - Check if DiagnosticSink already has a WarningStateTracker before creating new one - This preserves pragma warning state across __include'd files - Add regression tests for multifile pragma warnings Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Add additional test cases for nested pragma warnings - Test nested __include scenarios with pragma warning directives - Verify pragma warnings work correctly with multiple levels of includes Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tests/diagnostics/nested-pragma-main.slang')
-rw-r--r--tests/diagnostics/nested-pragma-main.slang9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/diagnostics/nested-pragma-main.slang b/tests/diagnostics/nested-pragma-main.slang
new file mode 100644
index 000000000..1795f7d68
--- /dev/null
+++ b/tests/diagnostics/nested-pragma-main.slang
@@ -0,0 +1,9 @@
+//TEST:SIMPLE(filecheck=CHECK):
+
+module nested_pragma_test;
+
+#pragma warning(disable: 30856)
+
+__include "nested-pragma-impl1.slang";
+
+// CHECK-NOT: warning 30856 \ No newline at end of file