[PATCH] D149561: [clang-format] Recognize Verilog edge identifiers

sstwcw via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 30 16:53:12 PDT 2023


sstwcw created this revision.
Herald added projects: All, clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.
sstwcw requested review of this revision.

Previously the event expression would be misidentified as a port list.
A line break would be added after the comma.  The events can be
separated with either a comma or the `or` keyword, and a line break
would not be inserted if the `or` keyword was used.  We changed the
behavior of the comma to match the `or` keyword.

Before:

  always @(posedge x,
           posedge y)
    x <= x;
  always @(posedge x or posedge y)
    x <= x;

After:

  always @(posedge x, posedge y)
    x <= x;
  always @(posedge x or posedge y)
    x <= x;


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149561

Files:
  clang/lib/Format/FormatToken.h
  clang/unittests/Format/FormatTestVerilog.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149561.518369.patch
Type: text/x-patch
Size: 12767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230430/c1924c1c/attachment-0001.bin>


More information about the cfe-commits mailing list