[PATCH] D146310: [clang-format] Fix dropped 'else' in 398cddf6acec

2023-04-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Submitted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146310/new/ https://reviews.llvm.org/D146310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D146310: [clang-format] Fix dropped 'else' in 398cddf6acec

2023-04-21 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9e9e096ae95b: [clang-format] Fix dropped 'else'. (authored by klimek). Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. H

[clang] 9e9e096 - [clang-format] Fix dropped 'else'.

2023-04-21 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-04-21T11:59:45Z New Revision: 9e9e096ae95b9a41bf855cda01963a65313e9560 URL: https://github.com/llvm/llvm-project/commit/9e9e096ae95b9a41bf855cda01963a65313e9560 DIFF: https://github.com/llvm/llvm-project/commit/9e9e096ae95b9a41bf855cda01963a65313e9560.diff LOG

[PATCH] D147176: [clang-format] NFC ensure Style operator== remains sorted for ease of editing

2023-03-30 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. And thanks a lot for cleaning up, really appreciate it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147176/new/ https://reviews.llvm.org/D147176 ___ cfe-commits mailing list cfe

[PATCH] D147176: [clang-format] NFC ensure Style operator== remains sorted for ease of editing

2023-03-30 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. I apologize for not tagging appropriately - is that process documented somewhere? Herald added a comment. NOTE: Clang-Format Team Automated Review Comment It looks like your clang-format review does not contain any unit tests, please try to ensure all code changes hav

[PATCH] D146310: [clang-format] Fix dropped 'else' in 398cddf6acec

2023-03-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Thanks, yes, I did not intend to delete the else. This only triggers with fuzzing with rather involved inputs, thus I wasn't able to create a nice enough unit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146310/new/

Re: [PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-03-23 Thread Manuel Klimek via cfe-commits
I am so sorry, thanks for sending out the patch already and fixing the layout! On Thu, Mar 23, 2023 at 10:08 AM MyDeveloperDay via Phabricator < revi...@reviews.llvm.org> wrote: > MyDeveloperDay added a comment. > > I know this is like "telling my grandmother to suck eggs" but @klimek the > chan

[PATCH] D146704: [clang-format] NFC Format.h and ClangFormatStyleOptions.rst are out of date

2023-03-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. Thank you!! Sorry for forgetting that I needed to do this, CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146704/new/ https://reviews.llvm.org/D146704 ___

[PATCH] D145244: [clang-format] Add ability to trace tokens.

2023-03-06 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Answering the fundamental design question first. Comment at: clang/lib/Format/ContinuationIndenter.cpp:289 Current.closesBlockOrBlockTypeList(Style))) { +DEBUG_FORMAT_TRACE_TOKEN(Current, "!canBreak"); return

[PATCH] D145244: [clang-format] Add ability to trace tokens.

2023-03-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 502123. klimek added a comment. Remove superfluous include. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145244/new/ https://reviews.llvm.org/D145244 Files: clang/lib/Format/CMakeLists.txt clang/lib/Format

[PATCH] D145244: [clang-format] Add ability to trace tokens.

2023-03-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added a project: All. klimek requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145244 Files: clang/lib/Format/CMakeLists.txt clang/lib/Form

[clang] f8d10d5 - [clang-format][NFC] Refactor formatting unit tests.

2023-03-01 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-03-01T12:36:07Z New Revision: f8d10d5ac9ab4b45b388c74357fc82fb96562e66 URL: https://github.com/llvm/llvm-project/commit/f8d10d5ac9ab4b45b388c74357fc82fb96562e66 DIFF: https://github.com/llvm/llvm-project/commit/f8d10d5ac9ab4b45b388c74357fc82fb96562e66.diff LOG

[clang] 398cddf - [clang-format] Fix assertion that doesn't hold under fuzzing.

2023-02-27 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-02-27T10:50:42Z New Revision: 398cddf6acecfb12b5997c2d639ee3cf31b787ad URL: https://github.com/llvm/llvm-project/commit/398cddf6acecfb12b5997c2d639ee3cf31b787ad DIFF: https://github.com/llvm/llvm-project/commit/398cddf6acecfb12b5997c2d639ee3cf31b787ad.diff LOG

[clang] f600a5a - [clang-format] Add macro replacement to fuzzing.

2023-02-27 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-02-27T10:40:22Z New Revision: f600a5aec52c0aa56e4e47c992b6f10e5cd7b7af URL: https://github.com/llvm/llvm-project/commit/f600a5aec52c0aa56e4e47c992b6f10e5cd7b7af DIFF: https://github.com/llvm/llvm-project/commit/f600a5aec52c0aa56e4e47c992b6f10e5cd7b7af.diff LOG

[clang] 0140283 - [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-02-24T15:44:24Z New Revision: 01402831aaae76e9c61595f9aa81a506b0d926eb URL: https://github.com/llvm/llvm-project/commit/01402831aaae76e9c61595f9aa81a506b0d926eb DIFF: https://github.com/llvm/llvm-project/commit/01402831aaae76e9c61595f9aa81a506b0d926eb.diff LOG

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG01402831aaae: [clang-format] Add simple macro replacements in formatting. (authored by klimek). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:4592 + !Macros.hasArity(ID->TokenText, Args->size())) { +// The macro is overloaded to be both object-like and function-like, +// but none of the function-like arities matc

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 500191. klimek added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144170/new/ https://reviews.llvm.org/D144170 Files: clang/include/clang/Format/Format.h clang/lib/Forma

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/MacroExpander.cpp:172 assert(defined(ID->TokenText)); + assert( + (!OptionalArgs && ObjectLike.find(ID->TokenText) != ObjectLike.end()) || sammccall wrote: > this assertion failure isn't going to

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 500181. klimek marked 5 inline comments as done. klimek added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144170/new/ https://reviews.llvm.org/D144170 Files: clang/includ

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:22584 + Style.Macros.push_back("CALL(x)=f([] { x })"); + Style.Macros.push_back("ASSIGN_OR_RETURN(a, b, c)=a = (b) || (c)"); + sammccall wrote: > klimek wrote: > > sammccall wrote:

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 500121. klimek marked 6 inline comments as done. klimek added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144170/new/ https://reviews.llvm.org/D144170 Files: clang/includ

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 499777. klimek added a comment. Add comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144170/new/ https://reviews.llvm.org/D144170 Files: clang/include/clang/Format/Format.h clang/lib/Format/Continuati

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:744 + // Align following lines within parenthesis / brackets if configured. + // For a line of macro parents, the commas that follow the opening parenthesis + // in the line come after the ope

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-23 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 499771. klimek marked 9 inline comments as done. klimek added a comment. Address reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144170/new/ https://reviews.llvm.org/D144170 Files: clang/incl

[PATCH] D144170: [clang-format] Add simple macro replacements in formatting.

2023-02-16 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added a project: All. klimek requested review of this revision. Herald added a project: clang. Add configuration to specify macros. Macros will be expanded, and the code will be parsed and annotated in the expanded state. In

[clang] 8c1f77a - [clang-format] Fix windows build.

2023-02-15 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-02-15T20:59:43Z New Revision: 8c1f77af7fd14d5a611246aa16b9693d3ebcee22 URL: https://github.com/llvm/llvm-project/commit/8c1f77af7fd14d5a611246aa16b9693d3ebcee22 DIFF: https://github.com/llvm/llvm-project/commit/8c1f77af7fd14d5a611246aa16b9693d3ebcee22.diff LOG

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1995d4424505: [clang-format] Enable FormatTokenSource to insert tokens. (authored by klimek). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[clang] 1995d44 - [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-02-15T12:39:24Z New Revision: 1995d4424505cb5a1c3f0e5f851a660ec32d7af1 URL: https://github.com/llvm/llvm-project/commit/1995d4424505cb5a1c3f0e5f851a660ec32d7af1 DIFF: https://github.com/llvm/llvm-project/commit/1995d4424505cb5a1c3f0e5f851a660ec32d7af1.diff LOG

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.h:287 // owned outside of and handed into the UnwrappedLineParser. + // FIXME: The above fixme doesn't work if we need to create tokens while + // parsing. sammccall wrote: > I'm

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 497637. klimek marked an inline comment as done. klimek added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143070/new/ https://reviews.llvm.org/D143070 Files: clang/lib/Fo

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 497416. klimek added a comment. Undo changes to ownership of initial set of FormatTokens. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143070/new/ https://reviews.llvm.org/D143070 Files: clang/lib/Format/For

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/FormatTokenSource.h:74 public: - IndexedTokenSource(ArrayRef Tokens) + IndexedTokenSource(SmallVectorImpl &Tokens) : Tokens(Tokens), Position(-1) {} sammccall wrote: > As I understand it, this p

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 497415. klimek marked 3 inline comments as done. klimek added a comment. Address reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143070/new/ https://reviews.llvm.org/D143070 Files: clang/lib/

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-01 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added a project: All. klimek requested review of this revision. Herald added a project: clang. In preparation for configured macro replacements in formatting, add the ability to insert tokens to FormatTokenSource, and impleme

[clang] 04ed86f - [clang-format][NFC] Bring FormatTokenSource under test.

2023-01-31 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-01-31T16:06:46Z New Revision: 04ed86ff1b7272faf8e62fa32da4acaa2d3c6add URL: https://github.com/llvm/llvm-project/commit/04ed86ff1b7272faf8e62fa32da4acaa2d3c6add DIFF: https://github.com/llvm/llvm-project/commit/04ed86ff1b7272faf8e62fa32da4acaa2d3c6add.diff LOG

[clang] be31f2c - [clang-format][NFC] Move IndexedTokenSource to FormatTokenSource header.

2023-01-31 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-01-31T15:06:20Z New Revision: be31f2c11d47d3eca28d922a06de181d6e23b355 URL: https://github.com/llvm/llvm-project/commit/be31f2c11d47d3eca28d922a06de181d6e23b355 DIFF: https://github.com/llvm/llvm-project/commit/be31f2c11d47d3eca28d922a06de181d6e23b355.diff LOG

[clang] c3bc61d - [clang-format][NFC] Pull FormatTokenSource into its own header.

2023-01-31 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-01-31T14:32:31Z New Revision: c3bc61d72f8da9a2b45e610ee3c2ccfc5f884f69 URL: https://github.com/llvm/llvm-project/commit/c3bc61d72f8da9a2b45e610ee3c2ccfc5f884f69 DIFF: https://github.com/llvm/llvm-project/commit/c3bc61d72f8da9a2b45e610ee3c2ccfc5f884f69.diff LOG

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-11-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. For non-functional clean-ups generally llvm doesn't require pre-commit review - I did communicate here so people involved in the original change wouldn't miss the clean-up. I do agree that what commits to pre-review is a fine line, and usually try to err on the side of p

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-11-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. I changed it in 49aca00d63e14df8bc68fc4329e6cbc9c9805eb8 . "We" is the people working on clang-format :) I hope that we have a common goal of making clang-format as easy to maintain as we can. FWIW, I

[clang] 49aca00 - [NFC] Remove peekNextToken(int).

2022-11-26 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2022-11-26T18:23:42Z New Revision: 49aca00d63e14df8bc68fc4329e6cbc9c9805eb8 URL: https://github.com/llvm/llvm-project/commit/49aca00d63e14df8bc68fc4329e6cbc9c9805eb8 DIFF: https://github.com/llvm/llvm-project/commit/49aca00d63e14df8bc68fc4329e6cbc9c9805eb8.diff LOG

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-11-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Generally, why do we need to have that much information? I.e. why do we need to know the exact type of the "requires" keyword? I do understand we need to know the brace type, but that seems like it would be easier to figure out in the TokenAnnotator (where we already pars

[PATCH] D119138: [clang-format] Further improve support for requires expressions

2022-11-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Herald added a project: All. Hey ho, sorry for the late comment here, but adding peekNextToken(n) is problematic, as this gets in the way of future changes we want to do to handle macros better. Usually we want to use X = Tokens->getPosition() and FormatTok = Tokens->set

[clang] d65019b - [NFC] Clean up printing of UnwrappedLines.

2022-11-25 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2022-11-25T14:26:47Z New Revision: d65019bbcb0a33502ebfc3cfc492e4d3cee9c7b7 URL: https://github.com/llvm/llvm-project/commit/d65019bbcb0a33502ebfc3cfc492e4d3cee9c7b7 DIFF: https://github.com/llvm/llvm-project/commit/d65019bbcb0a33502ebfc3cfc492e4d3cee9c7b7.diff LOG

Re: [clang] ee88c0c - [NFCI] Fix unused variable/function warnings in MacroCallReconstructorTest.cpp when asserts are disabled.

2022-11-25 Thread Manuel Klimek via cfe-commits
Fixed in ca8c6156f27003ffa0e24bace2be7c25307f50a3. On Thu, Jul 21, 2022 at 3:21 PM Manuel Klimek wrote: > Ping :) > > On Mon, Jul 18, 2022 at 1:22 PM Manuel Klimek wrote: > >> Ping :) >> >> On Wed, Jul 13, 2022 at 11:43 AM Manuel Klimek wrote: >> >>&g

[clang] ca8c615 - Fix test output regression from ee88c0cf09969ba44307068797e12533b94768a6.

2022-11-25 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2022-11-25T13:53:34Z New Revision: ca8c6156f27003ffa0e24bace2be7c25307f50a3 URL: https://github.com/llvm/llvm-project/commit/ca8c6156f27003ffa0e24bace2be7c25307f50a3 DIFF: https://github.com/llvm/llvm-project/commit/ca8c6156f27003ffa0e24bace2be7c25307f50a3.diff LOG

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2022-09-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D88299#3804910 , @owenpan wrote: > @sstwcw thanks for pointing it out. See D134329 > . Thanks Owen, really appreciate this! And sorry for not getting to it yet myself :( Repository: rG LLV

Re: [clang] ee88c0c - [NFCI] Fix unused variable/function warnings in MacroCallReconstructorTest.cpp when asserts are disabled.

2022-07-21 Thread Manuel Klimek via cfe-commits
Ping :) On Mon, Jul 18, 2022 at 1:22 PM Manuel Klimek wrote: > Ping :) > > On Wed, Jul 13, 2022 at 11:43 AM Manuel Klimek wrote: > >> This is a functional change, as it removes the debug output when the >> tokens do not match, which is important for understanding tes

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2022-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D88299#3660779 , @nridge wrote: > Thanks! (I was intrigued by Sam's "solves a whole class of clang-format's > biggest problems" comment :-)) The end-result hopefully will :) Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2022-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D88299#3660772 , @nridge wrote: > Does this patch change the formatting behaviour of clang-format? > > If so, are there any test cases that show before/after formatting? The > MacroCallReconstructorTest unit test seems like it's

Re: [clang] ee88c0c - [NFCI] Fix unused variable/function warnings in MacroCallReconstructorTest.cpp when asserts are disabled.

2022-07-18 Thread Manuel Klimek via cfe-commits
Ping :) On Wed, Jul 13, 2022 at 11:43 AM Manuel Klimek wrote: > This is a functional change, as it removes the debug output when the > tokens do not match, which is important for understanding test failures. > > On Wed, Jul 13, 2022 at 1:47 AM Jorge Gorbe Moya via cfe-commits <

Re: [clang] ee88c0c - [NFCI] Fix unused variable/function warnings in MacroCallReconstructorTest.cpp when asserts are disabled.

2022-07-13 Thread Manuel Klimek via cfe-commits
This is a functional change, as it removes the debug output when the tokens do not match, which is important for understanding test failures. On Wed, Jul 13, 2022 at 1:47 AM Jorge Gorbe Moya via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: Jorge Gorbe Moya > Date: 2022-07-12T16:46

[clang] f44d28f - Fix build errors.

2022-07-12 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2022-07-12T07:43:26Z New Revision: f44d28f840c0b0877b09d5547fd09e191bbdc90e URL: https://github.com/llvm/llvm-project/commit/f44d28f840c0b0877b09d5547fd09e191bbdc90e DIFF: https://github.com/llvm/llvm-project/commit/f44d28f840c0b0877b09d5547fd09e191bbdc90e.diff LOG

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2022-07-12 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd6d0dc1f4537: [clang-format] Add MacroUnexpander. (authored by klimek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[clang] d6d0dc1 - [clang-format] Add MacroUnexpander.

2022-07-12 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2022-07-12T07:11:46Z New Revision: d6d0dc1f45377ddaf5c10a48d64b09308b71501a URL: https://github.com/llvm/llvm-project/commit/d6d0dc1f45377ddaf5c10a48d64b09308b71501a DIFF: https://github.com/llvm/llvm-project/commit/d6d0dc1f45377ddaf5c10a48d64b09308b71501a.diff LOG

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2022-07-11 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 443729. klimek added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88299/new/ https://reviews.llvm.org/D88299 Files: clang/lib/Format/CMakeLists.txt clang/lib/Format/Form

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2022-07-11 Thread Manuel Klimek via Phabricator via cfe-commits
klimek marked 7 inline comments as done. klimek added inline comments. Comment at: clang/lib/Format/Macros.h:201 + /// Generally, this line tries to have the same structure as the expanded, + /// formatted unwrapped lines handed in via \c addLine(), with the exception + /// th

[clang] 4de0680 - Fix use of pointer arithmetic instead of iterators.

2022-07-05 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2022-07-05T08:23:42Z New Revision: 4de0680fbf4e4a9b9136ab5ee1ca549954eb8590 URL: https://github.com/llvm/llvm-project/commit/4de0680fbf4e4a9b9136ab5ee1ca549954eb8590 DIFF: https://github.com/llvm/llvm-project/commit/4de0680fbf4e4a9b9136ab5ee1ca549954eb8590.diff LOG

[clang] 4dcfae6 - Fix a violated precondition in clang-format.

2021-12-01 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2021-12-01T14:39:00+01:00 New Revision: 4dcfae6a003aa541600e5af42c0bec5d8e1abef0 URL: https://github.com/llvm/llvm-project/commit/4dcfae6a003aa541600e5af42c0bec5d8e1abef0 DIFF: https://github.com/llvm/llvm-project/commit/4dcfae6a003aa541600e5af42c0bec5d8e1abef0.diff

[clang] d688b31 - Fix segfault in clang-format.

2021-12-01 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2021-12-01T11:57:41+01:00 New Revision: d688b31628004ed9e109e63c2b43701f97252ff3 URL: https://github.com/llvm/llvm-project/commit/d688b31628004ed9e109e63c2b43701f97252ff3 DIFF: https://github.com/llvm/llvm-project/commit/d688b31628004ed9e109e63c2b43701f97252ff3.diff

[clang] 5978842 - Fix clang-format bug when handling conflict markers.

2021-12-01 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2021-12-01T11:23:04+01:00 New Revision: 59788422609433c50c3d3c16ca531fa56b9acb4f URL: https://github.com/llvm/llvm-project/commit/59788422609433c50c3d3c16ca531fa56b9acb4f DIFF: https://github.com/llvm/llvm-project/commit/59788422609433c50c3d3c16ca531fa56b9acb4f.diff

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2021-11-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Noticed I should have waiting with the renaming of the file until the review is done :( Sorry for the extra confusion. Comment at: clang/lib/Format/MacroUnexpander.cpp:77 + // stream, we need to continue the unexpansion until we find the right token +

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2021-11-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 390057. klimek marked 49 inline comments as done. klimek added a comment. Work in review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88299/new/ https://reviews.llvm.org/D88299 Files: clang/lib/For

[clang] 1b5a43a - Clean up clang-format tech debt.

2021-11-24 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2021-11-24T12:58:35+01:00 New Revision: 1b5a43ac3f1113cd0512752e021fc70740726698 URL: https://github.com/llvm/llvm-project/commit/1b5a43ac3f1113cd0512752e021fc70740726698 DIFF: https://github.com/llvm/llvm-project/commit/1b5a43ac3f1113cd0512752e021fc70740726698.diff

[PATCH] D114430: [clang-format] NFC - recent changes caused clang-format to no longer be clang-formatted.

2021-11-24 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Thanks for cleaning up after me, and sorry for the mess - do y'all have clang-format set up as a presubmit or do you just remember to format manually? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114430/new/ https://review

[clang] 84bf5e3 - Fix various problems found by fuzzing.

2021-11-22 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2021-11-22T11:08:38+01:00 New Revision: 84bf5e328664db2e744c4651c52d2460b1733d09 URL: https://github.com/llvm/llvm-project/commit/84bf5e328664db2e744c4651c52d2460b1733d09 DIFF: https://github.com/llvm/llvm-project/commit/84bf5e328664db2e744c4651c52d2460b1733d09.diff

[clang] c227192 - Make clang-format fuzz through Lexing with asserts enabled.

2021-11-19 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2021-11-19T14:44:06+01:00 New Revision: c2271926a4fc395e05cf75a8e57c2dfab1f02d3d URL: https://github.com/llvm/llvm-project/commit/c2271926a4fc395e05cf75a8e57c2dfab1f02d3d DIFF: https://github.com/llvm/llvm-project/commit/c2271926a4fc395e05cf75a8e57c2dfab1f02d3d.diff

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-08-09 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D69764#2934686 , @aaron.ballman wrote: > In D69764#2934612 , @MyDeveloperDay > wrote: > >>> I was referring to @rsmith and @aaron.ballman (to clarify), both are >>> maintainers in 'clan

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-08-09 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D69764#2934032 , @MyDeveloperDay wrote: > In D69764#2932929 , @steveire wrote: > >> > > @steveire, thanks for your comments, I also agree that a second tool > shouldn't be needed, espec

[PATCH] D96114: [ASTMatchers] Fix parent-child traversal between functions and parms

2021-02-08 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Can you explain the change and the before/after a bit more? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96114/new/ https://reviews.llvm.org/D96114 ___ cfe-commits mailin

[PATCH] D91996: [clang-format] Remove double trim

2020-11-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Isn't the comment incorrect after this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91996/new/ https://reviews.llvm.org/D91996 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2020-10-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/FormatToken.h:449 + /// When macro expansion introduces parents, those are marked as + /// \c MacroParent, so formatting knows their children need to be formatted. sammccall wrote: > I can't really un

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2020-10-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 301253. klimek marked 3 inline comments as done. klimek added a comment. Adapted based on review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88299/new/ https://reviews.llvm.org/D88299 Files: clang

[PATCH] D89920: Export TemplateArgumentMatcher so clients defining custom matchers don't need to use the internal namespace

2020-10-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89920/new/ https://reviews.llvm.org/D89920 ___ cfe

[PATCH] D88952: [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords

2020-10-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. Nice catch, thanks! LG! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88952/new/ https://reviews.llvm.org/D88952 __

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8333 +TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) { + // This is a regression test for mis-parsing the & after decltype as a binary arichardson wrote: > aricha

[PATCH] D88956: [clang-format] Fix misformatted macro definitions after D86959

2020-10-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8333 +TEST_F(FormatTest, UnderstandsUsesOfStarAndAmpInMacroDefinition) { + // This is a regression test for mis-parsing the & after decltype as a binary I'd put this into a new tes

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-09-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D83296#2299062 , @nridge wrote: > What does this change mean for users of clang-format -- better formatting of > complicated (e.g. multi-line) macro invocations? In addition to what Sam said, this also attempts to be an improve

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-09-28 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D84306#2294952 , @MyDeveloperDay wrote: > Which bit do you find more complex? adding something to the FormatToken or > the use of the `is()` calls? I think mainly that a) the language doesn't support bitfields well yet, as ev

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2020-09-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. klimek requested review of this revision. MacroUnexpander applies the structural formatting of expanded lines into UnwrappedLines to the corresponding une

[clang] e336b74 - [clang-format] Add a MacroExpander.

2020-09-25 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2020-09-25T14:08:13+02:00 New Revision: e336b74c995d665bc3fb75164375bbb0f78f516c URL: https://github.com/llvm/llvm-project/commit/e336b74c995d665bc3fb75164375bbb0f78f516c DIFF: https://github.com/llvm/llvm-project/commit/e336b74c995d665bc3fb75164375bbb0f78f516c.diff

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-09-25 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. klimek marked 5 inline comments as done. Closed by commit rGe336b74c995d: [clang-format] Add a MacroExpander. (authored by klimek). Changed prior to commit: https://

[PATCH] D84306: [clang-format][NFC] Be more careful about the layout of FormatToken.

2020-09-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. FWIW, finding this due to seeing the added complexity. Do you have data on what the difference is on clang-format for either overall memory use or performance? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84306/new

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-09-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 292970. klimek marked 7 inline comments as done. klimek added a comment. Worked in review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83296/new/ https://reviews.llvm.org/D83296 Files: clang/lib/Fo

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-09-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/FormatToken.h:177 +/// EndOfExpansion: 0 0 0 21 0 1 +struct MacroContext { + MacroContext(MacroRole Role) : Role(Role) {} sammccall wrote: > "context" is often pretty vague - "MacroSource" i

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-08-20 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/MacroExpander.cpp:186 +Tok->MacroCtx = MacroContext(MR_ExpandedArg); + pushToken(Tok); +} sammccall wrote: > klimek wrote: > > sammccall wrote: > > > you're pushing here without copying.

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-08-19 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/MacroExpander.cpp:186 +Tok->MacroCtx = MacroContext(MR_ExpandedArg); + pushToken(Tok); +} sammccall wrote: > you're pushing here without copying. This means the original tokens from the

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-07-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/MacroExpander.cpp:35 + SmallVector Params; + SmallVector Tokens; +}; sammccall wrote: > Tokens -> Expansion? (semantics rather than type) Changed to "Body". Comment at: clang/lib/Form

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-07-29 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 281611. klimek marked 27 inline comments as done. klimek added a comment. Addressed code review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83296/new/ https://reviews.llvm.org/D83296 Files: clang/

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-07-13 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In D83296#2146970 , @sammccall wrote: > In D83296#2146870 , @klimek wrote: > > > Monday-morning ping. > > > Thanks for the reminder here... however this is taking me a bit to get my > head a

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-07-13 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Monday-morning ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83296/new/ https://reviews.llvm.org/D83296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D83621: [clang][Tooling] Try to avoid file system access if there is no record for the file in compile_commads.json

2020-07-13 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a subscriber: djasper. klimek added a comment. @djasper wrote this iirc, but I doubt he'll have much time to look into this :) IIRC the symlink checking was there because some part of the system on linux tends to give us realpaths (with CMake builds), and that leads to not finding

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-07-09 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:631-636 + else if (FormatTok->is(tok::arrow)) { +// Following the } we can find a trailing return type arrow +// as part of an implicit conversion constraint. +nextToken(); +parseS

[PATCH] D83296: [clang-format] Add a MacroExpander.

2020-07-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. The MacroExpander allows to expand simple (non-resursive) macro definitions from a macro identifier token and macro arguments. It annotates the tokens wit

[PATCH] D83218: Hand Allocator and IdentifierTable into FormatTokenLexer.

2020-07-07 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c2a61397607: Hand Allocator and IdentifierTable into FormatTokenLexer. (authored by klimek). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83218/new/ https

[clang] 8c2a613 - Hand Allocator and IdentifierTable into FormatTokenLexer.

2020-07-07 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2020-07-07T11:56:34+02:00 New Revision: 8c2a613976075368a1f6e3ac3c9c8b1927b465ec URL: https://github.com/llvm/llvm-project/commit/8c2a613976075368a1f6e3ac3c9c8b1927b465ec DIFF: https://github.com/llvm/llvm-project/commit/8c2a613976075368a1f6e3ac3c9c8b1927b465ec.diff

[PATCH] D83218: Hand Allocator and IdentifierTable into FormatTokenLexer.

2020-07-07 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 275964. klimek added a comment. Address review comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83218/new/ https://reviews.llvm.org/D83218 Files: clang/lib/Format/FormatTokenLexer.cpp clang/lib/Format

[PATCH] D83218: Hand Allocator and IdentifierTable into FormatTokenLexer.

2020-07-06 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows us to share the allocator in the future so we can create tokens while parsing. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D83

[PATCH] D83076: Revert AST Matchers default to AsIs mode

2020-07-03 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83076/new/ https://reviews.llvm.org/D83076 ___ c

[PATCH] D82771: [ASTMatcher] Fix a performance regression: memorize the child match.

2020-06-30 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:468 +// Memoize result even doing a single-level match, it might be expensive. +Key.Type = MaxDepth == 1 ? Mat

  1   2   3   4   5   6   7   8   9   10   >