[PATCH] D146401: [clang-format] Don't squash Verilog escaped identifiers

sstwcw via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 19 19:54:44 PDT 2023


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

An escaped identifier always needs a space following it so the parser
can tell it apart from the next token.

The unit tests are changed to use `FormatTestBase.h` because we need the
2-argument version of `verifyFormat`.  We also added the `messUp`
virtual function because Verilog needs a different version of it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146401

Files:
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTestBase.h
  clang/unittests/Format/FormatTestVerilog.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146401.506454.patch
Type: text/x-patch
Size: 12361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230320/16b88328/attachment-0001.bin>


More information about the cfe-commits mailing list