Skip to content

Unexpected break before lessless if it is between two strings #38220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llvmbot opened this issue Sep 7, 2018 · 2 comments
Closed

Unexpected break before lessless if it is between two strings #38220

llvmbot opened this issue Sep 7, 2018 · 2 comments
Labels
bugzilla Issues migrated from bugzilla clang-format duplicate Resolved as duplicate

Comments

@llvmbot
Copy link
Member

llvmbot commented Sep 7, 2018

Bugzilla Link 38872
Resolution DUPLICATE
Resolved on Jun 03, 2020 06:28
Version 6.0
OS Linux
Reporter LLVM Bugzilla Contributor
CC @mydeveloperday

Extended Description

$ echo -e 'void fu(void) {\ncout << "A" << "B" << "C" << D << "E" << "F" << "G"\n}' | clang-format -style="{BasedOnStyle: LLVM, AlignAfterOpenBracket: DontAlign, AlignOperands: false}"
void fu(void) {
cout << "A"
<< "B"
<< "C" << D << "E"
<< "F"
<< "G"
}

clang-format inserts an (unwanted) break before a lessless (stream insertion) operator if (and only if) it is between two string literals. Why? Is there any intention or rationale? (ColumnLimit cannot be a cause.)

Moreover the lessless-es get aligned, despite that no alignment is allowed.

@mydeveloperday
Copy link
Contributor

See llvm/llvm-bugzilla-archive#44542

*** This bug has been marked as a duplicate of bug llvm/llvm-bugzilla-archive#44542 ***

@mydeveloperday
Copy link
Contributor

mentioned in issue llvm/llvm-bugzilla-archive#44542

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-format duplicate Resolved as duplicate
Projects
None yet
Development

No branches or pull requests

2 participants