[PATCH] D154093: [clang-format] Break long strings in Verilog

2023-07-15 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 540752. sstwcw added a comment. - Add back the const qualifier Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154093/new/ https://reviews.llvm.org/D154093 Files: clang/docs/ClangFormatStyleOptions.rst clang/

[PATCH] D154093: [clang-format] Break long strings in Verilog

2023-07-15 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked an inline comment as done. sstwcw added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:2247 bool DryRun, bool Strict) { - std::unique_ptr Token = + std::unique_ptr Token = createBreakableTo

[PATCH] D154091: [clang-format] Recognize escape sequences when breaking strings

2023-08-23 Thread sstwcw via Phabricator via cfe-commits
sstwcw abandoned this revision. sstwcw added a comment. I am closing it since no one seems to like it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154091/new/ https://reviews.llvm.org/D154091 ___ cfe-c

[PATCH] D154467: [clang-format] Add Verilog suffixes to the scripts

2023-08-23 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG825cec2c0b1e: [clang-format] Add Verilog suffixes to the scripts (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-08-23 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG16ccba51072b: [clang-format] Break long string literals in C#, etc. (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D158697: [clang-format][doc] Correct typos

2023-08-23 Thread sstwcw via Phabricator via cfe-commits
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. Herald added a comment. NOTE: Clang-Format Team Automated Re

[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-08-24 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. In the JavaScript tests that I added, it was wrong to use `SmallString`. Would you prefer me changing it to `string` or expanding the 6 test cases so we don't need a variable for the string? Shortly after I committed this patch, the server builds caught the problem in

[PATCH] D158697: [clang-format][doc] Correct typos

2023-08-26 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1d0061fc5e1f: [clang-format][doc] Correct typos (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-08-26 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 553729. sstwcw added a comment. Stop using `SmallString` in the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154093/new/ https://reviews.llvm.org/D154093 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D154093: [clang-format] Break long string literals in C#, etc.

2023-09-04 Thread sstwcw via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGddc80637ccbc: [clang-format] Break long string literals in C#, etc. (authored by sstwcw). Changed prior to commit: https://reviews.llvm.org/D154093?vs=553729&id=555795#toc Repository: rG LLVM Github

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

2023-03-15 Thread sstwcw via Phabricator via cfe-commits
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.getNextNonCommen

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

2023-03-19 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb688b58f83ce: [clang-format] Fix non-case colons in Verilog case lines (authored by sstwcw). Changed prior to commit: https://reviews.llvm.org/D14

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

2023-03-19 Thread sstwcw via Phabricator via cfe-commits
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 follow

[PATCH] D146402: [clang-format] Handle Verilog assign statements

2023-03-19 Thread sstwcw via Phabricator via cfe-commits
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. Repository: rG LLVM Github Monorepo https://re

[PATCH] D146403: [clang-format] More work on space around operators in Verilog

2023-03-19 Thread sstwcw via Phabricator via cfe-commits
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. before: (opcode *>o1) = 6.1; a inside{b, c};

[PATCH] D146403: [clang-format] More work on space around operators in Verilog

2023-03-19 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 506457. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146403/new/ https://reviews.llvm.org/D146403 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTestVerilog.cpp Index: clang/unittes

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

2023-03-22 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked an inline comment as done. sstwcw added inline comments. Comment at: clang/unittests/Format/FormatTestVerilog.cpp:897 } +} // namespace +} // namespace test MyDeveloperDay wrote: > is this correct? do you have an anonymous namespace? It is correct.

[PATCH] D146402: [clang-format] Handle Verilog assign statements

2023-03-25 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf90668c8ccc5: [clang-format] Handle Verilog assign statements (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146403: [clang-format] More work on space around operators in Verilog

2023-03-25 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0e01c3d28217: [clang-format] More work on space around operators in Verilog (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SIN

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

2023-03-26 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6cef325481a8: [clang-format] Don't squash Verilog escaped identifiers (authored by sstwcw). Changed prior to commit: https://reviews.llvm.org/D146

[PATCH] D145794: [clang-format] Recognize Verilog always blocks

2023-03-10 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added reviewers: HazardyKnusperkeks, MyDeveloperDay, owenpan, rymiel. sstwcw added a project: clang-format. Herald added a project: All. sstwcw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The small `

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

2023-03-12 Thread sstwcw via Phabricator via cfe-commits
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. Back in D128714

[PATCH] D145794: [clang-format] Recognize Verilog always blocks

2023-03-13 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa1f8bab9bad7: [clang-format] Recognize Verilog always blocks (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D152623: [clang-format] Indent Verilog struct literal on new line

2023-06-22 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. > So I assume your `'` is a 'DictLiteral`? The brace following the quote is a `DictLiteral`. The quote is a `tok::identifier` and `TT_Unknown`. > Does it have to be one? The brace is set to this type when used this way in all other languages. I don't want to make an

[PATCH] D152623: [clang-format] Indent Verilog struct literal on new line

2023-06-22 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 533617. sstwcw added a comment. - limit change to Verilog Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152623/new/ https://reviews.llvm.org/D152623 Files: clang/lib/Format/ContinuationIndenter.cpp clang/un

[PATCH] D154091: [clang-format] Prefer breaking long strings at new lines

2023-06-29 Thread sstwcw via Phabricator via cfe-commits
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, escape sequences in string literals were not rec

[PATCH] D154093: [clang-format] Break strings in Verilog

2023-06-29 Thread sstwcw via Phabricator via cfe-commits
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. In Verilog, concatenations need to have braces around them a

[PATCH] D154091: [clang-format] Prefer breaking long strings at new lines

2023-06-29 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/lib/Format/BreakableToken.cpp:225 +return BreakableToken::Split(NewLine, 0); + if (AfterSpace >= 2) +return BreakableToken::Split(AfterSpace, 0); Should I change the threshold from 2 to 1? It is set to 2 b

[PATCH] D152623: [clang-format] Indent Verilog struct literal on new line

2023-06-29 Thread sstwcw via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6bf66d839f13: [clang-format] Indent Verilog struct literal on new line (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152623/new/ https

[PATCH] D147327: [clang-format] Add option for having one port on a line in Verilog

2023-03-31 Thread sstwcw via Phabricator via cfe-commits
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. Herald added a comment. NOTE: Clang-Format Team Automated Re

[PATCH] D147328: [clang-format] Handle enum in Verilog

2023-03-31 Thread sstwcw via Phabricator via cfe-commits
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. Verilog has enum just like C. Repository: rG LLVM Github

[PATCH] D147329: [clang-format] Handle Verilog struct literals

2023-03-31 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. Herald added subscribers: cfe-commits, ctetreau. Herald added projects: All, clang, clang-format. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. sstwcw requested review of this revision. Previously `isVerilogIdentifier` was mistaking the

[PATCH] D147327: [clang-format] Add option for having one port per line in Verilog

2023-03-31 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 510038. sstwcw added a comment. Generate doc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147327/new/ https://reviews.llvm.org/D147327 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Form

[PATCH] D147327: [clang-format] Add option for having one port per line in Verilog

2023-04-01 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 510244. sstwcw marked 2 inline comments as done. sstwcw added a comment. - Use shorter conditions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147327/new/ https://reviews.llvm.org/D147327 Files: clang/docs/C

[PATCH] D147328: [clang-format] Handle enum in Verilog

2023-04-01 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG92b2be39656b: [clang-format] Handle enum in Verilog (authored by sstwcw). Changed prior to commit: https://reviews.llvm.org/D147328?vs=510031&id=5

[PATCH] D147329: [clang-format] Handle Verilog struct literals

2023-04-01 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGfeb585e7d62c: [clang-format] Handle Verilog struct literals (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D147327: [clang-format] Add option for having one port per line in Verilog

2023-04-02 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 510385. sstwcw added a comment. - Use lambda Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147327/new/ https://reviews.llvm.org/D147327 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Form

[PATCH] D147422: [clang-format] NFC Document the other space before colon option

2023-04-02 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added reviewers: HazardyKnusperkeks, MyDeveloperDay, owenpan, rymiel. Herald added subscribers: cfe-commits, JDevlieghere. Herald added projects: All, clang, clang-format. sstwcw requested review of this revision. Herald added a comment. NOTE: Clang-Format Team

[PATCH] D147422: [clang-format] NFC Document the other space before colon option

2023-04-03 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. In D147422#4240024 , @MyDeveloperDay wrote: > In D147422#4240021 , @owenpan wrote: > >> Should we extend `SpacesInContainerLiterals` so that it controls JSON colons >> too? If yes, then w

[PATCH] D147327: [clang-format] Add option for having one port per line in Verilog

2023-04-04 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG74cc4389f37d: [clang-format] Add option for having one port per line in Verilog (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D147422: [clang-format] NFC Document the other space before colon option

2023-04-07 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8385ee05e59d: [clang-format] NFC Document the other space before colon option (authored by sstwcw). Changed prior to commit: https://reviews.llvm.

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-07 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/docs/tools/dump_format_style.py:72 - subtype, napplied = re.subn(r'^std::vector<(.*)>$', r'\1', typestr) - if napplied == 1: -return 'List of ' + pluralize(to_yaml_type(subtype)) + match = re.match(r'std::vector<(.*)>$', ty

[PATCH] D147895: [clang-format] Handle Verilog assertions and loops

2023-04-09 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added reviewers: HazardyKnusperkeks, MyDeveloperDay, owenpan, rymiel. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. sstwcw requested review of this revision. Assert statements in Verilog can optionally have an else par

[PATCH] D93240: [clang-format] Add SpaceBeforeCaseColon option

2023-04-09 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. Herald added a project: All. Herald added reviewers: rymiel, owenpan. A goto label isn't affected by this option. Is it intentional? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93240/new/ https://reviews.llvm.org/D93240

[PATCH] D147895: [clang-format] Handle Verilog assertions and loops

2023-04-11 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:844 "};"); - ASSERT_EQ(Tokens.size(), 44u); + ASSERT_EQ(Tokens.size(), 44u) << Tokens; EXPECT_TOKEN(Tokens[13], tok::kw_requires, TT_RequiresClause);

[PATCH] D147895: [clang-format] Handle Verilog assertions and loops

2023-04-16 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0571ba8d1b4d: [clang-format] Handle Verilog assertions and loops (authored by sstwcw). Changed prior to commit: https://reviews.llvm.org/D147895?v

[PATCH] D148482: [clang-format][NFC] Output tokens on test assert

2023-04-16 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added reviewers: HazardyKnusperkeks, MyDeveloperDay, owenpan, rymiel. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. sstwcw requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.

[PATCH] D148484: [clang-format] Correctly format goto labels followed by blocks

2023-04-16 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added reviewers: HazardyKnusperkeks, MyDeveloperDay, owenpan, rymiel. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. sstwcw requested review of this revision. There doesn't seem to be an issue on GitHub. But previously

[PATCH] D148484: [clang-format] Correctly format goto labels followed by blocks

2023-04-16 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:714 // are in a control flow statements as well as several style flags. -if (Line.First->is(tok::kw_case) || +if (Line.First->is(tok::kw_case) || Line.Last->is(TT_GotoLabelColon) ||

[PATCH] D148482: [clang-format][NFC] Output tokens on test assert

2023-04-16 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb6301a018d58: [clang-format][NFC] Output tokens on test assert (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D148484: [clang-format] Correctly format goto labels followed by blocks

2023-04-17 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 514249. sstwcw added a comment. - Remove change in line wrapping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148484/new/ https://reviews.llvm.org/D148484 Files: clang/lib/Format/FormatToken.h clang/lib/Fo

[PATCH] D148484: [clang-format] Correctly format goto labels followed by blocks

2023-04-17 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked 3 inline comments as done. sstwcw added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:4525 -const FormatToken *Next = Right.getNextNonComment(); -if (!Next || Next->is(tok::semi)) return false; MyDeveloperDay wrote:

[PATCH] D151632: [clang-format] Parse the Verilog language option in configuration

2023-05-28 Thread sstwcw via Phabricator via cfe-commits
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. Repository: rG LLVM Github Monorepo https://reviews.llvm.

[PATCH] D151632: [clang-format] Parse the Verilog language option in configuration

2023-06-02 Thread sstwcw via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG24231df9b8ef: [clang-format] Parse the Verilog language option in configuration (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151632/ne

[PATCH] D143825: [clang-format] Put ports on separate lines in Verilog module headers

2023-02-11 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added reviewers: HazardyKnusperkeks, MyDeveloperDay, curdeius, owenpan, rymiel. Herald added a project: All. sstwcw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. New: module mh1 (input var in

[PATCH] D143825: [clang-format] Put ports on separate lines in Verilog module headers

2023-02-17 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked 3 inline comments as done. sstwcw added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2836 + Tok = Tok->getNextNonComment(); + } else if (Tok->is(tok::hashhash)) { +// Concatenation. Skip. MyDeveloperDay wrot

[PATCH] D143825: [clang-format] Put ports on separate lines in Verilog module headers

2023-02-17 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 498376. sstwcw marked 3 inline comments as done. sstwcw added a comment. - add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143825/new/ https://reviews.llvm.org/D143825 Files: clang/lib/Format/FormatTo

[PATCH] D143825: [clang-format] Put ports on separate lines in Verilog module headers

2023-02-19 Thread sstwcw via Phabricator via cfe-commits
sstwcw added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2665 +if (Style.isVerilog() && Precedence == prec::Comma && +VerilogFirstOfType != nullptr) { + addFakeParenthesis(VerilogFirstOfType, prec::Comma); owenpan wrote: > An

[PATCH] D144355: [clang-format][NFC] Clean up nullptr comparison style

2023-02-19 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. @MyDeveloperDay Looking at the return lines in the functions in `FormatToken.h` got me to check the similar functions not changed by this patch. And I noticed that the final `==` in `isCSharpKeyword` seems to return true when the token is not a keyword. Repository:

[PATCH] D143825: [clang-format] Put ports on separate lines in Verilog module headers

2023-02-19 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6e473aeffdc1: [clang-format] Put ports on separate lines in Verilog module headers (authored by sstwcw). Changed prior to commit: https://reviews.

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

2023-05-06 Thread sstwcw via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe12428557a45: [clang-format] Recognize Verilog edge identifiers (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149561/new/ https://revi

[PATCH] D149657: [clang-format] Don't indent Verilog `begin` keyword on its own line

2023-05-06 Thread sstwcw via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf722b01246d: [clang-format] Don't indent Verilog `begin` keyword on its own line (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149657/

[PATCH] D149562: [clang-format] Stop comment disrupting indentation of Verilog ports

2023-05-10 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. > IMO a trailing comment (empty or not) belongs to the code before it. There is only a parenthesis before it. It doesn't usually need a comment. It is like in 5a61139. One doesn't tend to comment a single brace. > A comment about the code below it should start on a ne

[PATCH] D150452: [clang-format] Recognize nested blocks

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
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. Now a block gets recognized as a block if it contains a bloc

[PATCH] D149562: [clang-format] Stop comment disrupting indentation of Verilog ports

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. > I agree if the brace doesn't start a block, but clang-format sometimes got it > wrong and misannotates a block as a braced list. (See > https://github.com/llvm/llvm-project/issues/33891 for an example.) This patch isn't affected by the problem. The Verilog port list i

[PATCH] D150452: [clang-format] Recognize nested blocks

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 521667. sstwcw added a comment. - Remove the special case for operator[], it isn't necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150452/new/ https://reviews.llvm.org/D150452 Files: clang/lib/Format

[PATCH] D150452: [clang-format] Recognize nested blocks

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw abandoned this revision. sstwcw added a comment. I like D150403 better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150452/new/ https://reviews.llvm.org/D150452 __

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. I would suggest adding a link to the revision on the issue thread for your future bug fixes. This people like me don't try to fix what others have fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150403/new/ https://reviews.llvm.org/D150403 ___

[PATCH] D150403: [clang-format] Adjust braced list detection (try 2)

2023-05-12 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. > To this end, I am tracking the previous token type in a stack parallel > to LBraceStack to help scope this particular case. Maybe keep the description up to date with the code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150403/new/ https://reviews.llvm.org/

[PATCH] D149562: [clang-format] Stop comment disrupting indentation of Verilog ports

2023-05-15 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG369e8762b4d6: [clang-format] Stop comment disrupting indentation of Verilog ports (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D148484: [clang-format] Correctly format goto labels followed by blocks

2023-04-24 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. Is this patch accepted or rejected? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148484/new/ https://reviews.llvm.org/D148484 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D149352: [clang-format] Recognize Verilog type dimension in module header

2023-04-27 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added a reviewer: curdeius. 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. We had the function `veri

[PATCH] D149352: [clang-format] Recognize Verilog type dimension in module header

2023-04-30 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4134f836103e: [clang-format] Recognize Verilog type dimension in module header (authored by sstwcw). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D148484: [clang-format] Correctly format goto labels followed by blocks

2023-04-30 Thread sstwcw via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG82a90caa88fd: [clang-format] Correctly format goto labels followed by blocks (authored by sstwcw). Changed prior to commit: https://reviews.llvm.o

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

2023-04-30 Thread sstwcw via Phabricator via cfe-commits
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

[PATCH] D149562: [clang-format] Stop comment disrupting indentation of Verilog ports

2023-04-30 Thread sstwcw via Phabricator via cfe-commits
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. Before: module x #( // parameter x)

[PATCH] D149562: [clang-format] Stop comment disrupting indentation of Verilog ports

2023-05-02 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. In D149562#4310396 , @HazardyKnusperkeks wrote: > I don't see the problem, could you elaborate a bit more? (Keep in mind, I > have no idea about Verilog.) The current way the port list gets formatted is like this: module x

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

2023-05-02 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 518752. sstwcw added a comment. - add annotator test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149561/new/ https://reviews.llvm.org/D149561 Files: clang/lib/Format/FormatToken.h clang/unittests/Format/F

[PATCH] D149657: [clang-format] Stop indent Verilog `begin` keyword on single line

2023-05-02 Thread sstwcw via Phabricator via cfe-commits
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. When the line is too long and the `begin` keyword wraps to t

[PATCH] D152623: [clang-format] Indent Verilog struct literal on new line

2023-06-10 Thread sstwcw via Phabricator via cfe-commits
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. Before: c = // '{default: 0}; After: c = // '

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-02-21 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 410271. sstwcw retitled this revision from "Add option to align compound assignments like `+=`" to "[clang-format] Add option to align compound assignments like `+=`". sstwcw added a comment. Herald added subscribers: llvm-commits, dexonsmith. Herald added a p

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-02-21 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked 3 inline comments as done. sstwcw added a comment. About the unit tests that failed in B150668 . It looks like they were stopped because they took over 1 minute. I ran the first test on my laptop. Both this revision and main took about 2 minute

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-02-21 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 410400. sstwcw marked 2 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.llvm.org/D119599 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/tools/dump_

[PATCH] D120361: [clang-format] Extract doc for entire configuration structs

2022-02-22 Thread sstwcw via Phabricator via cfe-commits
sstwcw created this revision. sstwcw added a reviewer: clang-format. sstwcw added a project: clang-format. sstwcw requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously the comments for configuration structs as a whole like ``BraceWrapp

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-02-22 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked 18 inline comments as done. sstwcw added a comment. The YAML stuff are now in D120363 . Comment at: clang/docs/ClangFormatStyleOptions.rst:1408-1415 + Precise control over the wrapping of braces. + + .. code-block:: c++ + +#

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-04 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 413149. sstwcw marked 2 inline comments as done. sstwcw added a comment. Herald added a project: All. Take out things in other revisions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-04 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 413152. sstwcw marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.llvm.org/D119599 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/tools/dump_

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-04 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked 7 inline comments as done. sstwcw added inline comments. Comment at: clang/docs/tools/dump_format_style.py:293 state = State.InNestedStruct - field_type, field_name = re.match(r'([<>:\w(,\s)]+)\s+(\w+);', line).groups() + field_type, fi

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-05 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 413251. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.llvm.org/D119599 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/Format/Format.c

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-05 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 413271. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.llvm.org/D119599 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/Format/Format.c

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-05 Thread sstwcw via Phabricator via cfe-commits
sstwcw marked 5 inline comments as done. sstwcw added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:16800 + Alignment)); +} + HazardyKnusperkeks wrote: > Can you test it with `AlignConsecutiveDeclarations`? Do you mean like

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-06 Thread sstwcw via Phabricator via cfe-commits
sstwcw added a comment. About chained assignments, the current program does not attempt to align them in a consistent way. And this revision doesn't change it. Both before and after this revision, the output depend on the order of the statements. Foo = Bar = 5; Int Baz = 5; Int Baz

[PATCH] D119599: [clang-format] Add option to align compound assignments like `+=`

2022-03-06 Thread sstwcw via Phabricator via cfe-commits
sstwcw updated this revision to Diff 413313. sstwcw added a comment. remove `int` in tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119599/new/ https://reviews.llvm.org/D119599 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/c

<    1   2   3