Skip to content

clang-format: break added to macro define with ColumnLimit: 0 #49164

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
WimLeflere mannequin opened this issue Apr 2, 2021 · 2 comments
Closed

clang-format: break added to macro define with ColumnLimit: 0 #49164

WimLeflere mannequin opened this issue Apr 2, 2021 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior bugzilla Issues migrated from bugzilla clang-format

Comments

@WimLeflere
Copy link
Mannequin

WimLeflere mannequin commented Apr 2, 2021

Bugzilla Link 49820
Version 11.0
OS Windows NT

Extended Description

Formatting following code with 'ColumnLimit: 0'

#define STRINGIFY(t) #t
#define MAKEVERSIONSTRING(x, y, z, build) STRINGIFY(x) "." STRINGIFY(y) "." STRINGIFY(z) "." STRINGIFY(build)

Results in:

#define STRINGIFY(t) #t
#define MAKEVERSIONSTRING(x, y, z, build) STRINGIFY(x) \
"." STRINGIFY(y) "." STRINGIFY(z) "." STRINGIFY(build)

No break should be added as the column limit is 0 (unlimited).
If the column limit is set to e.g. 120, the break is not added.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@mydeveloperday mydeveloperday added the bug Indicates an unexpected problem or unintended behavior label Dec 18, 2021
@mkurdej
Copy link
Member

mkurdej commented Jan 10, 2022

Review: https://reviews.llvm.org/D116859.

@mkurdej mkurdej added the awaiting-review Has pending Phabricator review label Jan 10, 2022
mkurdej pushed a commit that referenced this issue Jan 14, 2022
Fix for #[[ #49164 | 49164 ]] issue.

Reviewed By: MyDeveloperDay, HazardyKnusperkeks, curdeius, owenpan

Differential Revision: https://reviews.llvm.org/D116859
@mkurdej mkurdej closed this as completed Jan 14, 2022
@mkurdej
Copy link
Member

mkurdej commented Jan 14, 2022

Fixed in 47a9eb2.

@asl asl removed the awaiting-review Has pending Phabricator review label Jan 27, 2022
mem-frob pushed a commit to draperlaboratory/hope-llvm-project that referenced this issue Oct 7, 2022
Fix for #[[ llvm/llvm-project#49164 | 49164 ]] issue.

Reviewed By: MyDeveloperDay, HazardyKnusperkeks, curdeius, owenpan

Differential Revision: https://reviews.llvm.org/D116859
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior bugzilla Issues migrated from bugzilla clang-format
Projects
None yet
Development

No branches or pull requests

3 participants