llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) <details> <summary>Changes</summary> Fixes #<!-- -->44363. --- Full diff: https://github.com/llvm/llvm-project/pull/69871.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (-4) - (modified) clang/unittests/Format/FormatTest.cpp (+4) ``````````diff diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 7f85f48de2ed2ed..e185afaa2885123 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return true; if (Left.IsUnterminatedLiteral) return true; - if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) && - Right.Next->is(tok::string_literal)) { - return true; - } if (Right.is(TT_RequiresClause)) { switch (Style.RequiresClausePosition) { case FormatStyle::RCPS_OwnLine: diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 0a87cfc4f1d6af9..0841ea1bcb66fa9 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -26459,6 +26459,10 @@ TEST_F(FormatTest, AllowBreakBeforeNoexceptSpecifier) { Style); } +TEST_F(FormatTest, StreamOutputOperator) { + verifyFormat("std::cout << \"foo\" << \"bar\" << baz;"); +} + } // namespace } // namespace test } // namespace format `````````` </details> https://github.com/llvm/llvm-project/pull/69871 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits