Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5354, change diagnostic definition error message and expect output in test #6067

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/slang/slang-diagnostic-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2060,7 +2060,7 @@ DIAGNOSTIC(
DIAGNOSTIC(41000, Warning, unreachableCode, "unreachable code detected")
DIAGNOSTIC(41001, Error, recursiveType, "type '$0' contains cyclic reference to itself.")

DIAGNOSTIC(41010, Warning, missingReturn, "control flow may reach end of non-'void' function")
DIAGNOSTIC(41010, Warning, missingReturn, "non-void function does not return in all cases")
DIAGNOSTIC(
41011,
Error,
Expand Down
4 changes: 2 additions & 2 deletions tests/diagnostics/missing-return.slang.expected
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
result code = 0
standard error = {
tests/diagnostics/missing-return.slang(7): warning 41010: control flow may reach end of non-'void' function
tests/diagnostics/missing-return.slang(7): warning 41010: non-void function does not return in all cases
int bad(int a, int b)
^~~
tests/diagnostics/missing-return.slang(14): warning 41010: control flow may reach end of non-'void' function
tests/diagnostics/missing-return.slang(14): warning 41010: non-void function does not return in all cases
int alsoBad(int a, int b)
^~~~~~~
}
Expand Down