[PATCH] D124749: [clang-format] Handle Verilog preprocessor directives

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 00:57:33 PDT 2022


HazardyKnusperkeks added inline comments.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1889
       TokenCount = Line->Tokens.size();
-      if (TokenCount == 1 ||
-          (TokenCount == 2 && Line->Tokens.front().Tok->is(tok::comment))) {
----------------
Why did you remove that if?


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1906
+
         if (FormatTok->is(tok::colon) && !Line->MustBeDeclaration) {
           Line->Tokens.begin()->Tok->MustBreakBefore = true;
----------------
And now the indentation here is off.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124749



More information about the cfe-commits mailing list