[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-06-14 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. > A crash (https://bugs.llvm.org/show_bug.cgi?id=50663) in 12.0.1 is fixed by > your changes here when merged to the 12 branch, I'm not sure if this needs to > be backported to 12 I guess it might depend on if we think it's critical > enough or if there will more 12

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-03-04 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. In D94500#2605515 , @HazardyKnusperkeks wrote: > In D94500#2604754 , @timwoj wrote: > >> Rebase onto master again > > `master` or `main`? Please rebase on `main`. That is where the pushes

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-03-04 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 328308. timwoj added a comment. Rebase onto master again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/ https://reviews.llvm.org/D94500 Files: clang/docs/ReleaseNotes.rst

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-03-01 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. In D94500#2594394 , @HazardyKnusperkeks wrote: > In D94500#2593229 , @timwoj wrote: > >> In D94500#2592448 , >> @HazardyKnusperkeks wrote: >> >>>

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-02-28 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. In D94500#2592448 , @HazardyKnusperkeks wrote: > Do you need someone to push this? Yes I do. I don't have committer access. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-02-10 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 322689. timwoj added a comment. Rebased on main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/ https://reviews.llvm.org/D94500 Files: clang/docs/ReleaseNotes.rst

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-02-09 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 322477. timwoj added a comment. Added release note entry Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/ https://reviews.llvm.org/D94500 Files: clang/docs/ReleaseNotes.rst

[PATCH] D94500: [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-29 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. https://bugs.llvm.org/show_bug.cgi?id=48668 already exists as a bug report linked to this review. I'm not sure "the Zeek project would like to start using this" is a good enough reason to block an LLVM release though. I'm fairly certain there aren't a whole lot of

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-28 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj marked 8 inline comments as done. timwoj added a comment. No problem, sorry it took a bit of back-and-forth there. Is there any way this can sneak into 12.0? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-27 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 319716. timwoj added a comment. - Make LineLevel an enum class - Combine multiple duplicate checks into a named variable - Minor formatting fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-27 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2967 + // needs to be indented. + bool ClosesBlock = + Line->MatchingOpeningBlockLineIndex != UnwrappedLine::kInvalidIndex && curdeius wrote: > Please move below to the

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-25 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 319170. timwoj added a comment. Restored lost single-nesting namespace test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/ https://reviews.llvm.org/D94500 Files:

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-20 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 317924. timwoj added a comment. Add tests for Whitesmiths with all of the NamespaceIndentation options Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/ https://reviews.llvm.org/D94500 Files:

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-19 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 317766. timwoj added a comment. Fixing diff to look at the right commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/ https://reviews.llvm.org/D94500 Files:

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-19 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 317765. timwoj added a comment. Updates from review: - Fixed handling of IndentCaseLabels - Fixed indentation of namespace braces - Replaced bool argument to addUnwrappedLine with an enum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-14 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.h:143 bool tryToParseSimpleAttribute(); - void addUnwrappedLine(); + void addUnwrappedLine(bool RemoveLevel = true); bool eof() const; HazardyKnusperkeks wrote: > A `bool`

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-13 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added inline comments. Comment at: clang/lib/Format/TokenAnalyzer.cpp:71 Env.getFirstStartColumn(), Style, Encoding, Allocator, - IdentTable); HazardyKnusperkeks wrote: > Unrelated change (although I think

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-13 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. This fixes https://bugs.llvm.org/show_bug.cgi?id=48569, amongst other things. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94500/new/ https://reviews.llvm.org/D94500 ___

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-12 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj created this revision. timwoj requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This commit removes the old way of handling Whitesmiths mode in favor of just setting the levels during parsing and letting the formatter handle it from

[PATCH] D72793: [clang-format] Expand the SpacesAroundConditions option to include catch statements

2020-01-19 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. I know that 10.0 was branch recently. Any chance this can make it over? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72793/new/ https://reviews.llvm.org/D72793 ___ cfe-commits

[PATCH] D72793: [clang-format] Expand the SpacesAroundConditions option to include catch statements

2020-01-15 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This diff expands the SpacesAroundConditions option added in D68346 to include adding spaces to catch statements. Repository: rG LLVM Github Monorepo

[PATCH] D68346: [clang-format] Add new option to add spaces around conditions

2019-11-19 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. Thanks for the consideration on committer access, but I'm going to have to pass for the time being. That said, can someone land this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68346/new/

[PATCH] D68346: [clang-format] Add new option to add spaces around conditions

2019-10-16 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 225345. timwoj added a comment. Fix ordering Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68346/new/ https://reviews.llvm.org/D68346 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D68346: [clang-format] Add new option to add spaces around conditions

2019-10-14 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. In D68346#1708384 , @timwoj wrote: > Changed option name to SpacesInConditionalStatement, added > isKeywordWithCondition method, added some extra tests Sorry for the delay on getting back to this. I'm not the original author and

[PATCH] D68346: [clang-format] Add new option to add spaces around conditions

2019-10-14 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 224890. timwoj added a comment. Changed option name to SpacesInConditionalStatement, added isKeywordWithCondition method, added some extra tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68346/new/

[PATCH] D68346: Clang-format: Add new option to add spaces around conditions

2019-10-02 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This diff adds a new option SpacesAroundConditions that inserts spaces inside the braces for conditional statements. It's used by the Zeek project (https://github.com/zeek/zeek) as described in

[PATCH] D67627: Clang-format: Add Whitesmiths indentation style

2019-09-21 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. I don't have push access for `master`. Can someone merge this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67627/new/ https://reviews.llvm.org/D67627 ___ cfe-commits mailing

[PATCH] D67627: Clang-format: Add Whitesmiths indentation style

2019-09-17 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj updated this revision to Diff 220610. timwoj added a comment. Marked failing tests as FIXME Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67627/new/ https://reviews.llvm.org/D67627 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D67627: Clang-format: Add Whitesmiths indentation style

2019-09-16 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support for the Whitesmiths indentation style to clang-format. It’s an update to a patch submitted in 2015 (D6833 ), but reworks it to use the

[PATCH] D6833: Clang-format: Braces Indent Style Whitesmith

2019-06-11 Thread Tim Wojtulewicz via Phabricator via cfe-commits
timwoj added a comment. I updated this patch to remove all of the code from `ContinuationIndenter` and to use the newer `BraceWrapping` style option instead of setting each one individually in `UnwrappedLineParser`. I still have the same issue with enums. Looking at the `RootToken` in