[webkit-changes] [WebKit/WebKit] 1fcd68: [WGSL] Empty structs should be rejected

Tadeu Zagallo noreply at github.com
Mon Jan 22 04:53:34 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1fcd681a29a87c051da6138b2eb82d9ecc381296
      https://github.com/WebKit/WebKit/commit/1fcd681a29a87c051da6138b2eb82d9ecc381296
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2024-01-22 (Mon, 22 Jan 2024)

  Changed paths:
    M Source/WebGPU/WGSL/Parser.cpp
    A Source/WebGPU/WGSL/tests/invalid/empty-struct.wgsl
    M Source/WebGPU/WGSL/tests/invalid/redeclaration-reordering.wgsl

  Log Message:
  -----------
  [WGSL] Empty structs should be rejected
https://bugs.webkit.org/show_bug.cgi?id=267771
rdar://121247449

Reviewed by Mike Wyrzykowski.

It's not valid according to the spec to have a struct with no fields. We make it a
parser failure for now.

* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseStructure):
* Source/WebGPU/WGSL/tests/invalid/empty-struct.wgsl: Added.
* Source/WebGPU/WGSL/tests/invalid/redeclaration-reordering.wgsl:

Canonical link: https://commits.webkit.org/273294@main




More information about the webkit-changes mailing list