diff --git a/src/tint/reader/wgsl/parser_impl.cc b/src/tint/reader/wgsl/parser_impl.cc index 31481fe275..3bd7703b53 100644 --- a/src/tint/reader/wgsl/parser_impl.cc +++ b/src/tint/reader/wgsl/parser_impl.cc @@ -2213,7 +2213,8 @@ Maybe ParserImpl::case_body() { deprecated(source, "fallthrough is set to be removed from WGSL. " "Case can accept multiple selectors if the existing case bodies are empty. " - "default is not yet supported in a case selector list."); + "(e.g. `case 1, 2, 3:`) " + "`default` is a valid case selector value. (e.g. `case 1, default:`)"); stmts.Push(create(source)); break; diff --git a/src/tint/resolver/uniformity_test.cc b/src/tint/resolver/uniformity_test.cc index 0940e069d2..79047d1db9 100644 --- a/src/tint/resolver/uniformity_test.cc +++ b/src/tint/resolver/uniformity_test.cc @@ -3423,7 +3423,7 @@ fn foo() { RunTest(src, false); EXPECT_EQ( error_, - R"(test:11:7 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. + R"(test:11:7 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^ @@ -3493,7 +3493,7 @@ fn foo() { RunTest(src, false); EXPECT_EQ( error_, - R"(test:10:7 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. + R"(test:10:7 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^ diff --git a/test/tint/statements/switch/fallthrough.wgsl.expected.dxc.hlsl b/test/tint/statements/switch/fallthrough.wgsl.expected.dxc.hlsl index 0401873c43..de066b77ab 100644 --- a/test/tint/statements/switch/fallthrough.wgsl.expected.dxc.hlsl +++ b/test/tint/statements/switch/fallthrough.wgsl.expected.dxc.hlsl @@ -1,4 +1,4 @@ -statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. +statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^ diff --git a/test/tint/statements/switch/fallthrough.wgsl.expected.fxc.hlsl b/test/tint/statements/switch/fallthrough.wgsl.expected.fxc.hlsl index 0401873c43..de066b77ab 100644 --- a/test/tint/statements/switch/fallthrough.wgsl.expected.fxc.hlsl +++ b/test/tint/statements/switch/fallthrough.wgsl.expected.fxc.hlsl @@ -1,4 +1,4 @@ -statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. +statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^ diff --git a/test/tint/statements/switch/fallthrough.wgsl.expected.glsl b/test/tint/statements/switch/fallthrough.wgsl.expected.glsl index a8ba89975f..6ca3be411a 100644 --- a/test/tint/statements/switch/fallthrough.wgsl.expected.glsl +++ b/test/tint/statements/switch/fallthrough.wgsl.expected.glsl @@ -1,4 +1,4 @@ -statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. +statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^ diff --git a/test/tint/statements/switch/fallthrough.wgsl.expected.msl b/test/tint/statements/switch/fallthrough.wgsl.expected.msl index 3377486b65..d2cd679c2b 100644 --- a/test/tint/statements/switch/fallthrough.wgsl.expected.msl +++ b/test/tint/statements/switch/fallthrough.wgsl.expected.msl @@ -1,4 +1,4 @@ -statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. +statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^ diff --git a/test/tint/statements/switch/fallthrough.wgsl.expected.spvasm b/test/tint/statements/switch/fallthrough.wgsl.expected.spvasm index 4daf8702ce..dc8c06387b 100644 --- a/test/tint/statements/switch/fallthrough.wgsl.expected.spvasm +++ b/test/tint/statements/switch/fallthrough.wgsl.expected.spvasm @@ -1,4 +1,4 @@ -statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. +statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^ diff --git a/test/tint/statements/switch/fallthrough.wgsl.expected.wgsl b/test/tint/statements/switch/fallthrough.wgsl.expected.wgsl index b352c8fde8..50254ab400 100644 --- a/test/tint/statements/switch/fallthrough.wgsl.expected.wgsl +++ b/test/tint/statements/switch/fallthrough.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. default is not yet supported in a case selector list. +statements/switch/fallthrough.wgsl:6:13 warning: use of deprecated language feature: fallthrough is set to be removed from WGSL. Case can accept multiple selectors if the existing case bodies are empty. (e.g. `case 1, 2, 3:`) `default` is a valid case selector value. (e.g. `case 1, default:`) fallthrough; ^^^^^^^^^^^