[PATCH] D145888: [clang-format] Fix non-case colons in Verilog case lines

sstwcw via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 18:11:27 PDT 2023


sstwcw marked an inline comment as done.
sstwcw added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:4424
-    if (Line.First->isOneOf(tok::kw_default, tok::kw_case))
-      return Style.SpaceBeforeCaseColon;
     const FormatToken *Next = Right.getNextNonComment();
----------------
MyDeveloperDay wrote:
> Hmm.. this is going to impact others, did you make a change here before and break something for c++? or was this a bug in the C++ code, is there not a unit test for setting SpaceBeforeCaseColon? 
You can see that the previous rule already covers what this one covers.  This rule doesn't change the behavior for C++.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145888/new/

https://reviews.llvm.org/D145888



More information about the cfe-commits mailing list