diff options
author | Owen Pan <owenpiano@gmail.com> | 2025-07-20 19:01:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-20 19:01:46 -0700 |
commit | 06ed4d2c92ef7785f6c39e567b8bdefd2defdedb (patch) | |
tree | 5749cf9ff9e3140bf3f3f143826beaa6799360ae /clang/unittests/Format | |
parent | 22ef58ceda9490184f084fe1f938d333ba5d6cfd (diff) | |
download | llvm-06ed4d2c92ef7785f6c39e567b8bdefd2defdedb.zip llvm-06ed4d2c92ef7785f6c39e567b8bdefd2defdedb.tar.gz llvm-06ed4d2c92ef7785f6c39e567b8bdefd2defdedb.tar.bz2 |
[clang-format] Fix a bug in `BreakBeforeBinaryOperators: All` (#149695)
Fixes #149520
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 0bc1c6d..11d94e4 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -28375,6 +28375,11 @@ TEST_F(FormatTest, BreakAfterAttributes) { verifyFormat("[[nodiscard]]\n" "Foo& operator-(Foo&);", Style); + + Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All; + verifyFormat("[[deprecated]]\n" + "void f() = delete;", + Style); } TEST_F(FormatTest, InsertNewlineAtEOF) { |