From 1662f5578e46e7b47e3289b2764126c32a70e22d Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Wed, 21 Sep 2022 14:44:33 +0000 Subject: [PATCH] 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 Kokoro: Kokoro Reviewed-by: Ben Clayton Commit-Queue: Dan Sinclair Commit-Queue: Ben Clayton --- src/dawn/native/RingBufferAllocator.cpp | 2 +- src/tint/resolver/resolver.cc | 2 +- src/tint/resolver/type_validation_test.cc | 2 +- src/tint/resolver/variable_validation_test.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dawn/native/RingBufferAllocator.cpp b/src/dawn/native/RingBufferAllocator.cpp index 01e23e7c15..3d0269938d 100644 --- a/src/dawn/native/RingBufferAllocator.cpp +++ b/src/dawn/native/RingBufferAllocator.cpp @@ -99,7 +99,7 @@ uint64_t RingBufferAllocator::Allocate(uint64_t allocationSize, ExecutionSerial mCurrentRequestSize += allocationSize; } else if (allocationSize <= mUsedStartOffset) { // Try to sub-alloc at front. // 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; startOffset = 0; diff --git a/src/tint/resolver/resolver.cc b/src/tint/resolver/resolver.cc index 911b66c3e7..d57be4cf97 100644 --- a/src/tint/resolver/resolver.cc +++ b/src/tint/resolver/resolver.cc @@ -2280,7 +2280,7 @@ sem::Expression* Resolver::Identifier(const ast::IdentifierExpression* expr) { // Note: The spec is currently vague around the rules here. See // https://github.com/gpuweb/gpuweb/issues/3081. Remove this comment when resolved. 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); return nullptr; } diff --git a/src/tint/resolver/type_validation_test.cc b/src/tint/resolver/type_validation_test.cc index c5b72205fb..a5f7f3757d 100644 --- a/src/tint/resolver/type_validation_test.cc +++ b/src/tint/resolver/type_validation_test.cc @@ -342,7 +342,7 @@ TEST_F(ResolverTypeValidationTest, ArraySize_ModuleVar) { GlobalVar("a", ty.array(ty.f32(), Expr(Source{{12, 34}}, "size")), ast::StorageClass::kPrivate); EXPECT_FALSE(r()->Resolve()); 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)"); } diff --git a/src/tint/resolver/variable_validation_test.cc b/src/tint/resolver/variable_validation_test.cc index 9843d2f394..ea6707101b 100644 --- a/src/tint/resolver/variable_validation_test.cc +++ b/src/tint/resolver/variable_validation_test.cc @@ -65,7 +65,7 @@ TEST_F(ResolverVariableValidationTest, GlobalVarUsedAtModuleScope) { GlobalVar("b", ty.i32(), ast::StorageClass::kPrivate, Expr(Source{{56, 78}}, "a")); 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)"); }