Fixup some grammar.
This Cl updates some double negative grammar to be a bit more readable. Change-Id: Id5d9c64acc1dd8422b8116d8a6c1bf149f99e592 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103260 Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
05f3891eb6
commit
1662f5578e
|
@ -99,7 +99,7 @@ uint64_t RingBufferAllocator::Allocate(uint64_t allocationSize, ExecutionSerial
|
||||||
mCurrentRequestSize += allocationSize;
|
mCurrentRequestSize += allocationSize;
|
||||||
} else if (allocationSize <= mUsedStartOffset) { // Try to sub-alloc at front.
|
} else if (allocationSize <= mUsedStartOffset) { // Try to sub-alloc at front.
|
||||||
// Count the space at the end so that a subsequent
|
// Count the space at the end so that a subsequent
|
||||||
// sub-alloc cannot not succeed when the buffer is full.
|
// sub-alloc cannot fail when the buffer is full.
|
||||||
const uint64_t requestSize = (mMaxBlockSize - mUsedEndOffset) + allocationSize;
|
const uint64_t requestSize = (mMaxBlockSize - mUsedEndOffset) + allocationSize;
|
||||||
|
|
||||||
startOffset = 0;
|
startOffset = 0;
|
||||||
|
|
|
@ -2280,7 +2280,7 @@ sem::Expression* Resolver::Identifier(const ast::IdentifierExpression* expr) {
|
||||||
// Note: The spec is currently vague around the rules here. See
|
// Note: The spec is currently vague around the rules here. See
|
||||||
// https://github.com/gpuweb/gpuweb/issues/3081. Remove this comment when resolved.
|
// https://github.com/gpuweb/gpuweb/issues/3081. Remove this comment when resolved.
|
||||||
std::string desc = "var '" + builder_->Symbols().NameFor(symbol) + "' ";
|
std::string desc = "var '" + builder_->Symbols().NameFor(symbol) + "' ";
|
||||||
AddError(desc + "cannot not be referenced at module-scope", expr->source);
|
AddError(desc + "cannot be referenced at module-scope", expr->source);
|
||||||
AddNote(desc + "declared here", variable->Declaration()->source);
|
AddNote(desc + "declared here", variable->Declaration()->source);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,7 +342,7 @@ TEST_F(ResolverTypeValidationTest, ArraySize_ModuleVar) {
|
||||||
GlobalVar("a", ty.array(ty.f32(), Expr(Source{{12, 34}}, "size")), ast::StorageClass::kPrivate);
|
GlobalVar("a", ty.array(ty.f32(), Expr(Source{{12, 34}}, "size")), ast::StorageClass::kPrivate);
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
R"(12:34 error: var 'size' cannot not be referenced at module-scope
|
R"(12:34 error: var 'size' cannot be referenced at module-scope
|
||||||
note: var 'size' declared here)");
|
note: var 'size' declared here)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ TEST_F(ResolverVariableValidationTest, GlobalVarUsedAtModuleScope) {
|
||||||
GlobalVar("b", ty.i32(), ast::StorageClass::kPrivate, Expr(Source{{56, 78}}, "a"));
|
GlobalVar("b", ty.i32(), ast::StorageClass::kPrivate, Expr(Source{{56, 78}}, "a"));
|
||||||
|
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(), R"(56:78 error: var 'a' cannot not be referenced at module-scope
|
EXPECT_EQ(r()->error(), R"(56:78 error: var 'a' cannot be referenced at module-scope
|
||||||
12:34 note: var 'a' declared here)");
|
12:34 note: var 'a' declared here)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue