Cleanup some grammar.

This CL updates some grammar in break-if error messages.

Change-Id: I15ab6b98fd1b12dd4e6db16a28f0e311e9fee453
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111102
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2022-11-22 20:13:11 +00:00 committed by Dawn LUCI CQ
parent 6559903234
commit 2664229fd5
2 changed files with 6 additions and 4 deletions

View File

@ -849,7 +849,8 @@ TEST_F(ResolverValidationTest, Stmt_Loop_Continuing_BreakIf_Not_Last) {
WrapInFunction(loop_stmt);
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(), R"(12:23 error: break-if must be last statement in a continuing block
EXPECT_EQ(r()->error(),
R"(12:23 error: break-if must be the last statement in a continuing block
10:9 note: see continuing block here)");
}
@ -867,7 +868,8 @@ TEST_F(ResolverValidationTest, Stmt_Loop_Continuing_BreakIf_Duplicate) {
WrapInFunction(loop_stmt);
EXPECT_FALSE(r()->Resolve());
EXPECT_EQ(r()->error(), R"(12:23 error: break-if must be last statement in a continuing block
EXPECT_EQ(r()->error(),
R"(12:23 error: break-if must be the last statement in a continuing block
10:9 note: see continuing block here)");
}

View File

@ -1592,7 +1592,7 @@ bool Validator::BreakIfStatement(const sem::BreakIfStatement* stmt,
}
if (auto* continuing = s->As<sem::LoopContinuingBlockStatement>()) {
if (continuing->Declaration()->statements.Back() != stmt->Declaration()) {
AddError("break-if must be last statement in a continuing block",
AddError("break-if must be the last statement in a continuing block",
stmt->Declaration()->source);
AddNote("see continuing block here", s->Declaration()->source);
return false;
@ -1601,7 +1601,7 @@ bool Validator::BreakIfStatement(const sem::BreakIfStatement* stmt,
}
}
AddError("break-if must in a continuing block", stmt->Declaration()->source);
AddError("break-if must be in a continuing block", stmt->Declaration()->source);
return false;
}