[clang-format] Don't squash Verilog escaped identifiers
authorsstwcw <f0gukp2nk@protonmail.com>
Sun, 26 Mar 2023 22:42:36 +0000 (22:42 +0000)
committersstwcw <f0gukp2nk@protonmail.com>
Sun, 26 Mar 2023 22:45:44 +0000 (22:45 +0000)
commit6cef325481a8efc039ae9df5630609fd3a84560c
tree4172dd4f36d0fd2c6641dcd76023bf3f7ecea414
parent5b5c49ad4563f75debccbc6c3017d27a47ca217d
[clang-format] Don't squash Verilog escaped identifiers

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.

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D146401
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestBase.h
clang/unittests/Format/FormatTestVerilog.cpp