Page MenuHomePhabricator

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

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

Diff Detail

Unit TestsFailed

TimeTest
3,690 mslibcxx CI Modules > llvm-libc++-shared-cfg-in.libcxx/algorithms/specialized_algorithms/special_mem_concepts::nothrow_sentinel_for.compile.pass.cpp
Script: -- : 'COMPILED WITH'; /home/libcxx-builder/.buildkite-agent/builds/1c7ac1ad85af-1/llvm-project/libcxx-ci/install/bin/clang++ /home/libcxx-builder/.buildkite-agent/builds/1c7ac1ad85af-1/llvm-project/libcxx-ci/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_sentinel_for.compile.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -I /home/libcxx-builder/.buildkite-agent/builds/1c7ac1ad85af-1/llvm-project/libcxx-ci/build/generic-modules/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/1c7ac1ad85af-1/llvm-project/libcxx-ci/build/generic-modules/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/1c7ac1ad85af-1/llvm-project/libcxx-ci/libcxx/test/support -std=c++2b -fmodules -fcxx-modules -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-noexcept-type -Wno-atomic-alignment -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_DISABLE_AVAILABILITY -Werror=thread-safety -Wuser-defined-warnings -fsyntax-only

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–846

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–846

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
1628
1935–1936

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.