summaryrefslogtreecommitdiff
path: root/tests/diagnostics/entry-point-main-warning.slang
AgeCommit message (Collapse)Author
2025-05-15Rename 'main' on some backends (#7105)Mukund Keshava
* Rename 'main' on some backednds Fixes #5542 Some backends like cuda, metal, cpu do not allow 'main' as the entry point. This commit adds a new warning that is emitted when a program uses main as the entry point. In addition to emitting the warning, it internally renames the entry point to "main_". It also adds a test to check these for the three backends. * format code * move test to diagnostics * rename test to diagnostic * generate unique name --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>