This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Recognize Verilog non-blocking assignment
ClosedPublic

Authored by sstwcw on Jan 30 2023, 6:21 AM.

Diff Detail

Event Timeline

sstwcw created this revision.Jan 30 2023, 6:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 30 2023, 6:21 AM
sstwcw requested review of this revision.Jan 30 2023, 6:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 30 2023, 6:21 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sstwcw added a project: Restricted Project.Jan 30 2023, 6:27 AM
clang/lib/Format/WhitespaceManager.cpp
839–847

Do you need the extra case, or could you just activate AlignCompound?

If you do, can you please add parens, the precedence of ? and : in combination with || is at least for me not 100% clear.

sstwcw updated this revision to Diff 494303.Feb 2 2023, 7:22 AM
  • add parentheses
sstwcw marked an inline comment as done.Feb 2 2023, 7:23 AM
sstwcw added inline comments.
clang/lib/Format/WhitespaceManager.cpp
839–847

If I get you right, you are suggesting that AlignCompound: false is there only for backward compatibility, and we can make it default to true since we don't have to maintain backward compatibility for new things. I prefer consistency.

sstwcw marked an inline comment as done.Feb 2 2023, 7:23 AM

Looks ok to me. Please wait for some other opinion.

This revision is now accepted and ready to land.Feb 3 2023, 11:40 AM
owenpan added inline comments.Feb 4 2023, 2:58 AM
clang/lib/Format/TokenAnnotator.cpp
1650
1968–1969

Can you move them into the if statement above?

sstwcw updated this revision to Diff 494839.Feb 4 2023, 9:40 AM
  • add parentheses
  • rename field
sstwcw marked 2 inline comments as done.Feb 4 2023, 9:47 AM
owenpan accepted this revision.Feb 4 2023, 4:51 PM
This revision was landed with ongoing or failed builds.Feb 5 2023, 5:03 PM
This revision was automatically updated to reflect the committed changes.