diff --git a/source/slang/slang-diagnostic-defs.h b/source/slang/slang-diagnostic-defs.h index 821a895bc7..1d09189cce 100644 --- a/source/slang/slang-diagnostic-defs.h +++ b/source/slang/slang-diagnostic-defs.h @@ -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, diff --git a/tests/diagnostics/missing-return.slang.expected b/tests/diagnostics/missing-return.slang.expected index e41e756ff4..7626665241 100644 --- a/tests/diagnostics/missing-return.slang.expected +++ b/tests/diagnostics/missing-return.slang.expected @@ -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) ^~~~~~~ }