This revision was automatically updated to reflect the committed changes.
Closed by commit rG06763ea5d8f9: [clang-format] Ignore first token when finding
MustBreak (authored by rymiel).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150614/new/
https
HazardyKnusperkeks accepted this revision.
HazardyKnusperkeks added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:20136
"#ifdef _DEBUG\n"
- "void bar()\n"
- " {\n"
- " }\n"
+ "void bar(
rymiel added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:20136
"#ifdef _DEBUG\n"
- "void bar()\n"
- " {\n"
- " }\n"
+ "void bar() {}\n"
"#else\n"
rymi
rymiel added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:20136
"#ifdef _DEBUG\n"
- "void bar()\n"
- " {\n"
- " }\n"
+ "void bar() {}\n"
"#else\n"
Haza
HazardyKnusperkeks added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:20136
"#ifdef _DEBUG\n"
- "void bar()\n"
- " {\n"
- " }\n"
+ "void bar() {}\n"
"#else\n"
-
rymiel added inline comments.
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:891-895
+for (const FormatToken *Tok = Line->First; Tok; Tok = Tok->Next) {
+ // Ignore the first token, because in this situation, it applies more
+ // to the last token of the pr
rymiel updated this revision to Diff 522453.
rymiel marked an inline comment as done.
rymiel added a comment.
Start iteration from second token
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150614/new/
https://reviews.llvm.org/D150614
Files:
cla
owenpan added inline comments.
Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:891-895
+for (const FormatToken *Tok = Line->First; Tok; Tok = Tok->Next) {
+ // Ignore the first token, because in this situation, it applies more
+ // to the last token of the p
rymiel created this revision.
rymiel added a project: clang-format.
rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay.
Herald added projects: All, clang.
Herald added a subscriber: cfe-commits.
rymiel requested review of this revision.
When in ColumnLimit 0, the formatter looks f