patch for formatter bug 38525

2018-08-10 Thread Owen Pan via cfe-commits
Hi, Please see the attached patch file and test case for Bug 38525 in Formatter. Thanks, Owen Index: lib/Format/ContinuationIndenter.cpp === --- lib/Format/ContinuationIndenter.cpp (revis

Fwd: patch file for bug 38557

2018-08-14 Thread Owen Pan via cfe-commits
Hi, Attached is the patch file for Bug 38557 ( https://bugs.llvm.org/show_bug.cgi?id=38557). Thanks, Owen Index: UnwrappedLineParser.cpp === --- UnwrappedLineParser.cpp (revision 339102) +++ UnwrappedLineParser.cpp (working copy) @@

Re: Fwd: patch file for bug 38557

2018-08-14 Thread Owen Pan via cfe-commits
t you can take over, otherwise we can > get it into trunk for you :) > > All the best, Jonas > > Am 14.08.2018 um 12:30 schrieb Owen Pan via cfe-commits: > > Hi, > > Attached is the patch file for Bug 38557 ( > h

r342116 - [clang-format] Wrapped block after case label should not be merged into one line

2018-09-13 Thread Owen Pan via cfe-commits
Author: owenpan Date: Thu Sep 13 00:27:15 2018 New Revision: 342116 URL: http://llvm.org/viewvc/llvm-project?rev=342116&view=rev Log: [clang-format] Wrapped block after case label should not be merged into one line PR38854 Differential Revision: http://reviews.llvm.org/D51719 Modified: cfe/

r357851 - [clang-format] Fix Bug 41407

2019-04-06 Thread Owen Pan via cfe-commits
Author: owenpan Date: Sat Apr 6 16:10:11 2019 New Revision: 357851 URL: http://llvm.org/viewvc/llvm-project?rev=357851&view=rev Log: [clang-format] Fix Bug 41407 Differential Revision: https://reviews.llvm.org/D60359 Modified: cfe/trunk/lib/Format/ContinuationIndenter.cpp cfe/trunk/unitt

r357877 - [clang-format] Fix bug https://bugs.llvm.org/show_bug.cgi?id=41413

2019-04-07 Thread Owen Pan via cfe-commits
Author: owenpan Date: Sun Apr 7 14:05:52 2019 New Revision: 357877 URL: http://llvm.org/viewvc/llvm-project?rev=357877&view=rev Log: [clang-format] Fix bug https://bugs.llvm.org/show_bug.cgi?id=41413 Differential Revision: https://reviews.llvm.org/D60374 Modified: cfe/trunk/lib/Format/Conti

r357957 - [clang-format] Add AfterCaseLabel to BraceWrapping

2019-04-08 Thread Owen Pan via cfe-commits
Author: owenpan Date: Mon Apr 8 16:36:25 2019 New Revision: 357957 URL: http://llvm.org/viewvc/llvm-project?rev=357957&view=rev Log: [clang-format] Add AfterCaseLabel to BraceWrapping Fixes PR38686 llvm-svn: 52527 Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst cfe/trunk/include/c

Re: r357877 - [clang-format] Fix bug https://bugs.llvm.org/show_bug.cgi?id=41413

2019-04-13 Thread Owen Pan via cfe-commits
it to 'PR' (so PR41413 in this example). > > Thanks! > --paulr > > > -Original Message- > > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf > Of > > Owen Pan via cfe-commits > > Sent: Sunday, April 07, 2019 5:06

r358710 - [clang-format] Fix incorrect formatting of keyword macro definition

2019-04-18 Thread Owen Pan via cfe-commits
Author: owenpan Date: Thu Apr 18 13:17:08 2019 New Revision: 358710 URL: http://llvm.org/viewvc/llvm-project?rev=358710&view=rev Log: [clang-format] Fix incorrect formatting of keyword macro definition See PR39719 Differential Revision: https://reviews.llvm.org/D60853 Modified: cfe/trunk/li

r359029 - [clang-format] Fix bug in reflow of block comments containing CR/LF

2019-04-23 Thread Owen Pan via cfe-commits
Author: owenpan Date: Tue Apr 23 13:29:46 2019 New Revision: 359029 URL: http://llvm.org/viewvc/llvm-project?rev=359029&view=rev Log: [clang-format] Fix bug in reflow of block comments containing CR/LF Fix PR36119 Differential Revision: https://reviews.llvm.org/D60996 Modified: cfe/trunk/li

r359280 - [clang-format] Fix documentation for FixNamespaceComments

2019-04-26 Thread Owen Pan via cfe-commits
Author: owenpan Date: Fri Apr 26 00:05:47 2019 New Revision: 359280 URL: http://llvm.org/viewvc/llvm-project?rev=359280&view=rev Log: [clang-format] Fix documentation for FixNamespaceComments Fixes PR40409 Differential Revision: https://reviews.llvm.org/D61174 Modified: cfe/trunk/docs/Clang

r359687 - [clang-format] Fix bug that misses some function-like macro usages

2019-05-01 Thread Owen Pan via cfe-commits
Author: owenpan Date: Wed May 1 08:03:41 2019 New Revision: 359687 URL: http://llvm.org/viewvc/llvm-project?rev=359687&view=rev Log: [clang-format] Fix bug that misses some function-like macro usages Fixes PR41483 Differential Revision: https://reviews.llvm.org/D61297 Modified: cfe/trunk/l

r359711 - [clang-format] Fix a bug in AlignConsecutiveDeclarations.

2019-05-01 Thread Owen Pan via cfe-commits
Author: owenpan Date: Wed May 1 11:23:44 2019 New Revision: 359711 URL: http://llvm.org/viewvc/llvm-project?rev=359711&view=rev Log: [clang-format] Fix a bug in AlignConsecutiveDeclarations. Fixes PR37175 Differential Revision: https://reviews.llvm.org/D61222 Modified: cfe/trunk/lib/Format

r359943 - [clang-format] Fix bug in block comment reflow that joins * and /

2019-05-03 Thread Owen Pan via cfe-commits
Author: owenpan Date: Fri May 3 16:15:40 2019 New Revision: 359943 URL: http://llvm.org/viewvc/llvm-project?rev=359943&view=rev Log: [clang-format] Fix bug in block comment reflow that joins * and / Fixes PR41213 Differential Revision: https://reviews.llvm.org/D61276 Modified: cfe/trunk/li

r360256 - [clang] Fix a bug that reports UTF32 (LE) files as UTF16 (LE) ones

2019-05-08 Thread Owen Pan via cfe-commits
Author: owenpan Date: Wed May 8 06:49:17 2019 New Revision: 360256 URL: http://llvm.org/viewvc/llvm-project?rev=360256&view=rev Log: [clang] Fix a bug that reports UTF32 (LE) files as UTF16 (LE) ones Also fix a typo for the SCSU byte order mark. Differential Revision: https://reviews.llvm.org/D

r360257 - [clang-format] Fix the crash when formatting unsupported encodings

2019-05-08 Thread Owen Pan via cfe-commits
Author: owenpan Date: Wed May 8 07:11:12 2019 New Revision: 360257 URL: http://llvm.org/viewvc/llvm-project?rev=360257&view=rev Log: [clang-format] Fix the crash when formatting unsupported encodings Fixes PR33946 Differential Revision: https://reviews.llvm.org/D61559 Modified: cfe/trunk/t

r342708 - [clang-format] Do not merge short case labels if followed by a block.

2018-09-20 Thread Owen Pan via cfe-commits
Author: owenpan Date: Thu Sep 20 20:46:36 2018 New Revision: 342708 URL: http://llvm.org/viewvc/llvm-project?rev=342708&view=rev Log: [clang-format] Do not merge short case labels if followed by a block. Do not allow short case labels on a single line if the label is followed by a left brace. Fi

r343305 - [ClangFormat] 'try' of function-try-block doesn't obey BraceWrapping

2018-09-28 Thread Owen Pan via cfe-commits
Author: owenpan Date: Fri Sep 28 02:17:00 2018 New Revision: 343305 URL: http://llvm.org/viewvc/llvm-project?rev=343305&view=rev Log: [ClangFormat] 'try' of function-try-block doesn't obey BraceWrapping It should respond to AfterFunction, not AfterControlStatement. Fixes PR39067 Modified: c

r367648 - [clang-format] Fix a bug that doesn't break braces before unions for Allman

2019-08-01 Thread Owen Pan via cfe-commits
Author: owenpan Date: Thu Aug 1 21:30:42 2019 New Revision: 367648 URL: http://llvm.org/viewvc/llvm-project?rev=367648&view=rev Log: [clang-format] Fix a bug that doesn't break braces before unions for Allman Differential Revision: https://reviews.llvm.org/D65631 Modified: cfe/trunk/lib/Form

r368507 - [clang-format] Add SpaceInEmptyBlock option for WebKit

2019-08-10 Thread Owen Pan via cfe-commits
Author: owenpan Date: Sat Aug 10 00:51:21 2019 New Revision: 368507 URL: http://llvm.org/viewvc/llvm-project?rev=368507&view=rev Log: [clang-format] Add SpaceInEmptyBlock option for WebKit See PR40840 Differential Revision: https://reviews.llvm.org/D65925 Modified: cfe/trunk/docs/ClangForma

r368539 - [clang-format] Expand AllowShortBlocksOnASingleLine for WebKit

2019-08-11 Thread Owen Pan via cfe-commits
Author: owenpan Date: Sun Aug 11 10:48:36 2019 New Revision: 368539 URL: http://llvm.org/viewvc/llvm-project?rev=368539&view=rev Log: [clang-format] Expand AllowShortBlocksOnASingleLine for WebKit See PR40840 Differential Revision: https://reviews.llvm.org/D66059 Modified: cfe/trunk/docs/Cl

r369157 - [clang-format] Fix the bug that joins template closer and > or >>

2019-08-16 Thread Owen Pan via cfe-commits
Author: owenpan Date: Fri Aug 16 14:49:17 2019 New Revision: 369157 URL: http://llvm.org/viewvc/llvm-project?rev=369157&view=rev Log: [clang-format] Fix the bug that joins template closer and > or >> Also fixes a buggy test case. See PR42404 Differential Revision: https://reviews.llvm.org/D6633

r369214 - [clang-format] Fix a bug that joins template closer and =

2019-08-18 Thread Owen Pan via cfe-commits
Author: owenpan Date: Sun Aug 18 11:51:39 2019 New Revision: 369214 URL: http://llvm.org/viewvc/llvm-project?rev=369214&view=rev Log: [clang-format] Fix a bug that joins template closer and = Also fixes the documentation for SpaceBeforeAssignmentOperators. See discussions at https://reviews.llvm

r371571 - [clang-format] Apply BAS_AlwaysBreak to C++11 braced lists

2019-09-10 Thread Owen Pan via cfe-commits
Author: owenpan Date: Tue Sep 10 16:26:45 2019 New Revision: 371571 URL: http://llvm.org/viewvc/llvm-project?rev=371571&view=rev Log: [clang-format] Apply BAS_AlwaysBreak to C++11 braced lists See PR18455. Differential Revision: https://reviews.llvm.org/D67395 Modified: cfe/trunk/lib/Format

[clang] [clang-format] Add spaces around the Verilog implication operator (PR #71352)

2023-11-06 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/71352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
@@ -325,6 +325,7 @@ output of a unified diff and reformats all contained lines with The name of the predefined style used as a fallback in case clang-format is invoked with-style=file, but can not find the .clang-formatfile t

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/70883 >From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001 From: Conrad Donahue Date: Tue, 31 Oct 2023 21:55:27 -0400 Subject: [PATCH 1/3] Add ability for clang-format-diff to exit with non-0 status

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/70883 >From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001 From: Conrad Donahue Date: Tue, 31 Oct 2023 21:55:27 -0400 Subject: [PATCH 1/4] Add ability for clang-format-diff to exit with non-0 status

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
@@ -95,6 +95,12 @@ def main(): default="clang-format", help="location of binary to use for clang-format", ) +parser.add_argument( +"-non-zero-exit-code", +action="store_true", +default=False, +help="exit with a non-zero st

[clang] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/70883 >From 646cabcf167facb63c78277b50ea62afbc61b3c0 Mon Sep 17 00:00:00 2001 From: Conrad Donahue Date: Tue, 31 Oct 2023 21:55:27 -0400 Subject: [PATCH 1/5] Add ability for clang-format-diff to exit with non-0 status

[clang] [clang-format] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71755)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/71755 Also cleaned up some old test cases. Fixes #71563. >From 40769fdc8163e61c8a89bc983a7fa50b08ba5e04 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 8 Nov 2023 17:55:56 -0800 Subject: [PATCH] [clang-format] Hand

[clang] [clang-format] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/70883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/70883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71755)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/71755 >From c85d3c4879a5ff9d6f3ab318ebd7b63410249062 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 8 Nov 2023 17:55:56 -0800 Subject: [PATCH] [clang-format] Handle variable declarations in BreakAfterAttributes Al

[clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71755)

2023-11-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/71755 >From 17921d5a1d74017128691428815ede53ac1a4d67 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 8 Nov 2023 17:55:56 -0800 Subject: [PATCH] [clang-format] Handle variable declarations in BreakAfterAttributes Al

[clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71755)

2023-11-08 Thread Owen Pan via cfe-commits
owenca wrote: > However this doesn't address the second part of the linked issue (with the > `if`) does it? Nope! That part is a duplicate of #64474. I was going to add a note in #71563 before merging this PR but now just saw that @FalcoGer closed the old issue and opened the new one, which i

[clang] [clang-format]: Split alignment of declarations around assignment (PR #69340)

2023-11-09 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: See https://github.com/llvm/llvm-project/issues/66857#issuecomment-1793022188. Can you make this a suboption, e.g. `AlignFunctionPointers`? We can add another (e.g. `AlignConstructorsDestructors`) for ctors and dtors in the future. https://github.com/llvm/l

[clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71755)

2023-11-09 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/71755 >From 17921d5a1d74017128691428815ede53ac1a4d67 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 8 Nov 2023 17:55:56 -0800 Subject: [PATCH 1/2] [clang-format] Handle variable declarations in BreakAfterAttributes

[clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71755)

2023-11-09 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/71755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a0710e1 - Revert "[clang-format] Handle variable declarations in BreakAfterAttributes (#71755)"

2023-11-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-11-09T23:34:06-08:00 New Revision: a0710e162dac8eb845588779deb39f2b35e5cb88 URL: https://github.com/llvm/llvm-project/commit/a0710e162dac8eb845588779deb39f2b35e5cb88 DIFF: https://github.com/llvm/llvm-project/commit/a0710e162dac8eb845588779deb39f2b35e5cb88.diff LOG:

[clang] cc75e52 - [clang-format][NFC] Refactor isPointerOrReference

2023-11-10 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-11-10T01:23:05-08:00 New Revision: cc75e520162ef651977d3f6d11b0d0b92dd2be07 URL: https://github.com/llvm/llvm-project/commit/cc75e520162ef651977d3f6d11b0d0b92dd2be07 DIFF: https://github.com/llvm/llvm-project/commit/cc75e520162ef651977d3f6d11b0d0b92dd2be07.diff LOG:

[clang] f7bbb58 - Reland "[clang-format] Handle variable declarations in BreakAfterAttributes (#71755)"

2023-11-10 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-11-10T01:53:43-08:00 New Revision: f7bbb58690910a8320b0927525dfba19df69a910 URL: https://github.com/llvm/llvm-project/commit/f7bbb58690910a8320b0927525dfba19df69a910 DIFF: https://github.com/llvm/llvm-project/commit/f7bbb58690910a8320b0927525dfba19df69a910.diff LOG:

[clang] 86ef9d3 - Revert "[clang-format] Handle variable declarations in BreakAfterAttributes (#71755)"

2023-11-10 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-11-10T02:03:35-08:00 New Revision: 86ef9d36519f72c06741335ce0a445ab73eb4cfb URL: https://github.com/llvm/llvm-project/commit/86ef9d36519f72c06741335ce0a445ab73eb4cfb DIFF: https://github.com/llvm/llvm-project/commit/86ef9d36519f72c06741335ce0a445ab73eb4cfb.diff LOG:

[clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71755)

2023-11-10 Thread Owen Pan via cfe-commits
owenca wrote: @Meinersbur thanks for the info! https://github.com/llvm/llvm-project/pull/71755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71935)

2023-11-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/71935 Also fixed a bug in `isStartOfName()` and cleaned up some old test cases. Fixed #71563. This is a rework of #71755. >From 17921d5a1d74017128691428815ede53ac1a4d67 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: W

[llvm] [clang-tools-extra] [clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71935)

2023-11-10 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/71935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/71995 This patch doesn't work for do-while loops. Fixed #64474. >From b67ea36d180e700cc6b0661e8f2390eda515c566 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 Nov 2023 00:21:58 -0800 Subject: [PATCH] [clang-form

[clang] [clang-format][NFC] Simplify parseBracedList() (PR #72010)

2023-11-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72010 None >From f3f303d80a40b9ce8a13721cfa108b4094b8b2c3 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 Nov 2023 17:34:06 -0800 Subject: [PATCH] [clang-format][NFC] Simplify parseBracedList() --- clang/lib/Fo

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-11 Thread Owen Pan via cfe-commits
@@ -1432,34 +1432,82 @@ struct FormatStyle { /// const int i; /// [[gnu::const]] [[maybe_unused]] /// int j; +/// /// [[nodiscard]] /// inline int f(); /// [[gnu::const]] [[nodiscard]] /// int g(); +/// +/// [[likely]]

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-11 Thread Owen Pan via cfe-commits
@@ -2049,8 +2049,10 @@ the configuration (without a prefix: ``Auto``). .. _BreakAfterAttributes: **BreakAfterAttributes** (``AttributeBreakingStyle``) :versionbadge:`clang-format 16` :ref:`ΒΆ ` - Break after a group of C++11 attributes before a variable/function - (including

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-11 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/71995 >From b67ea36d180e700cc6b0661e8f2390eda515c566 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 Nov 2023 00:21:58 -0800 Subject: [PATCH 1/2] [clang-format] Handle control statements in BreakAfterAttributes

[clang] [clang-format] Remove special handling of comments after brace/paren (PR #71672)

2023-11-11 Thread Owen Pan via cfe-commits
@@ -802,7 +802,10 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, Previous.isNot(TT_ObjCMethodExpr) && Previous.isNot(TT_RequiresClause) && !(Current.MacroParent && Previous.MacroParent) && (Current.isNot(TT_LineComment) ||

[clang] [clang-format][NFC] Simplify parseBracedList() (PR #72010)

2023-11-11 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/72010 >From f3f303d80a40b9ce8a13721cfa108b4094b8b2c3 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 Nov 2023 17:34:06 -0800 Subject: [PATCH 1/2] [clang-format][NFC] Simplify parseBracedList() --- clang/lib/Form

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-12 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/71995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Simplify parseBracedList() (PR #72010)

2023-11-12 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/72010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a699ab5 - [clang-format][NFC] Remove redundant Block/Line Comment in is()

2023-11-13 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-11-13T02:14:37-08:00 New Revision: a699ab5adbefc4fa0d63edac8a137b0073576018 URL: https://github.com/llvm/llvm-project/commit/a699ab5adbefc4fa0d63edac8a137b0073576018 DIFF: https://github.com/llvm/llvm-project/commit/a699ab5adbefc4fa0d63edac8a137b0073576018.diff LOG:

[clang] [clang-format] Fix a bug in aligning comments in vector of structs (PR #72099)

2023-11-13 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72099 Fixed #71825. >From eab0253833b7a5910cec573cabf86bb6a1abf6ef Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 13 Nov 2023 02:37:30 -0800 Subject: [PATCH] [clang-format] Fix a bug in aligning comments in vector

[clang] [clang-format] Fix a bug in aligning comments in vector of structs (PR #72099)

2023-11-13 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/72099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Skip alignArrayInitializers() for 1-row matrices (PR #72166)

2023-11-13 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72166 Fixed #68431. >From 7442d202cdd0e22dba178731be01517aa8257d40 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 13 Nov 2023 14:04:32 -0800 Subject: [PATCH] [clang-format] Skip alignArrayInitializers() for 1-row

[clang] a852869 - [clang-format] Fix a bug in parsing function/variable names

2023-11-13 Thread Owen Pan via cfe-commits
Author: Gedare Bloom Date: 2023-11-13T19:35:28-08:00 New Revision: a852869398af71141d9422ab3e53a11433a3791f URL: https://github.com/llvm/llvm-project/commit/a852869398af71141d9422ab3e53a11433a3791f DIFF: https://github.com/llvm/llvm-project/commit/a852869398af71141d9422ab3e53a11433a3791f.diff

[clang] [clang-format] Handle constrained auto in QualifierAlignment (PR #72251)

2023-11-14 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72251 Fixed #69610. >From 8e61a470fc7e4cf11a6cf285668a7f9eca72702c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 14 Nov 2023 05:05:14 -0800 Subject: [PATCH] [clang-format] Handle constrained auto in QualifierAlign

[clang] [clang-format] Fix a bug in `git-clang-format --binary` (PR #74293)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74399 This is a minor improvement to #73491. >From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 4 Dec 2023 17:33:47 -0800 Subject: [PATCH] [clang-format][NFC] Use `prog` i

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/74399 >From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 4 Dec 2023 17:33:47 -0800 Subject: [PATCH 1/2] [clang-format][NFC] Use `prog` in clang-format-diff.py This is a mi

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/74399 >From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 4 Dec 2023 17:33:47 -0800 Subject: [PATCH 1/3] [clang-format][NFC] Use `prog` in clang-format-diff.py This is a mi

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-05 Thread Owen Pan via cfe-commits
owenca wrote: > You can remove the useless `import os` then :-) Good catch! https://github.com/llvm/llvm-project/pull/74399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [clang-tools-extra] [flang] [libc] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH 1/3] [clang-format] Add "three dot" diff option to git-clang-forma

[clang] [compiler-rt] [llvm] [clang-tools-extra] [flang] [libc] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-05 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/74230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Refactor getting first/last non-comment of line (PR #74570)

2023-12-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74570 None >From a37925ae51d95e91d32ec50bc39a9b6e5b13c571 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 5 Dec 2023 23:31:28 -0800 Subject: [PATCH] [clang-format][NFC] Refactor getting first/last non-comment of li

[clang] [clang-format][NFC] Refactor getting first/last non-comment of line (PR #74570)

2023-12-06 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74651 Fixed #41854. >From 40859e0887fd53bbb02be213fcacf3d6d1a5a487 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 6 Dec 2023 12:01:19 -0800 Subject: [PATCH] [clang-format] Handle merging functions containing only a

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Owen Pan via cfe-commits
@@ -411,9 +411,16 @@ class LineJoiner { } } +const auto *LastNonComment = TheLine->getLastNonComment(); +assert(LastNonComment); +// FIXME: There are probably cases where we should use LastNonComment owenca wrote: No. This is new from th

[clang] [clang-format] Handle merging functions containing only a block comment (PR #74651)

2023-12-06 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b683709 - [clang-format] Fix a possible crash in `AlignAfterOpenBracket: BlockIndent`

2023-12-06 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-12-06T17:40:41-08:00 New Revision: b683709ea6eec7d0a388bd50c571774c9b9ffdb7 URL: https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7 DIFF: https://github.com/llvm/llvm-project/commit/b683709ea6eec7d0a388bd50c571774c9b9ffdb7.diff LOG:

[clang] [clang-format][NFC] Clean up the driver and getStyle() in Format.cpp (PR #74794)

2023-12-07 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74794 None >From fb239719267ec97905ebb339176b5f7015de04eb Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 7 Dec 2023 17:42:45 -0800 Subject: [PATCH] [clang-format][NFC] Clean up ClangFormat.cpp and getStyle() in Fo

[clang] [clang-format][NFC] Clean up the driver and getStyle() in Format.cpp (PR #74794)

2023-12-08 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Skip alignArrayInitializers() for 1-row matrices (PR #72166)

2023-11-14 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/72166 >From 7442d202cdd0e22dba178731be01517aa8257d40 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 13 Nov 2023 14:04:32 -0800 Subject: [PATCH 1/2] [clang-format] Skip alignArrayInitializers() for 1-row matrices F

[clang] [clang-format] Skip alignArrayInitializers() for 1-row matrices (PR #72166)

2023-11-14 Thread Owen Pan via cfe-commits
@@ -20875,13 +20875,15 @@ TEST_F(FormatTest, CatchAlignArrayOfStructuresRightAlignment) { "};", Style); // TODO: Fix the indentations below when this option is fully functional. +#if 0 owenca wrote: Because it's wrong as the TO

[clang] [clang-format] Handle constrained auto in QualifierAlignment (PR #72251)

2023-11-14 Thread Owen Pan via cfe-commits
@@ -345,6 +345,8 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight( TypeToken = Next->getNextNonComment()->getNextNonComment(); } } +if (Next->is(tok::kw_auto)) owenca wrote: ```suggestion if (Next->is(tok::kw

[clang] [clang-format] Handle constrained auto in QualifierAlignment (PR #72251)

2023-11-14 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle constrained auto in QualifierAlignment (PR #72251)

2023-11-14 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/72251 >From 8e61a470fc7e4cf11a6cf285668a7f9eca72702c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 14 Nov 2023 05:05:14 -0800 Subject: [PATCH 1/2] [clang-format] Handle constrained auto in QualifierAlignment Fixe

[clang] [clang-format] Fix more bugs in isStartOfName() (PR #72336)

2023-11-14 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72336 Fixed #72264. >From 832b6dccb1a8b0d3af4c3970c6c85f97e9cf3283 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 14 Nov 2023 19:21:11 -0800 Subject: [PATCH] [clang-format] Fix more bugs in isStartOfName() Fixed #

[clang] [clang-format] Handle constrained auto in QualifierAlignment (PR #72251)

2023-11-15 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/72251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix more bugs in isStartOfName() (PR #72336)

2023-11-15 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/72336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle lambdas in QualifierAlignment (PR #72456)

2023-11-15 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72456 Fixed #62780. >From 5aae5d3c5b976d91548219aba4fb9c937d0fbbcc Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 15 Nov 2023 16:13:46 -0800 Subject: [PATCH] [clang-format] Handle lambdas in QualifierAlignment Fix

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-16 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72520 Fixed #55493. Fixed #68431. >From efdf321e9447e8b3f1c27ccdf6da842107deb6dd Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 16 Nov 2023 06:36:41 -0800 Subject: [PATCH] [clang-format] Fix crashes in AlignArrayOf

[clang] [clang-format] Skip alignArrayInitializers() for 1-row matrices (PR #72166)

2023-11-16 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle lambdas in QualifierAlignment (PR #72456)

2023-11-16 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/72456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-16 Thread Owen Pan via cfe-commits
@@ -1316,6 +1316,8 @@ void WhitespaceManager::alignArrayInitializersRightJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { + if (Ro

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-16 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-16 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/72520 >From efdf321e9447e8b3f1c27ccdf6da842107deb6dd Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 16 Nov 2023 06:36:41 -0800 Subject: [PATCH 1/2] [clang-format] Fix crashes in AlignArrayOfStructures Fixed #55493.

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
@@ -1316,6 +1316,8 @@ void WhitespaceManager::alignArrayInitializersRightJustified( auto Offset = std::distance(Cells.begin(), CellIter); for (const auto *Next = CellIter->NextColumnElement; Next; Next = Next->NextColumnElement) { + if (Ro

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/72520 >From efdf321e9447e8b3f1c27ccdf6da842107deb6dd Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 16 Nov 2023 06:36:41 -0800 Subject: [PATCH 1/3] [clang-format] Fix crashes in AlignArrayOfStructures Fixed #55493.

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
owenca wrote: We probably should backport it to 17.0.6. What do you all think? @tru https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
owenca wrote: > @owenca I picked da1b1fba5cfd41521a840202d8cf4c3796c5e10b on top of the 17.x > branch and my test case was not fixed, it still crashes in the same way as > described in #72628 Thanks for trying it on 17.x. We can't backport it then. https://github.com/llvm/llvm-project/pull/72

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/72520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix crashes in AlignArrayOfStructures (PR #72520)

2023-11-17 Thread Owen Pan via cfe-commits
@@ -20709,6 +20709,18 @@ TEST_F(FormatTest, CatchExceptionReferenceBinding) { TEST_F(FormatTest, CatchAlignArrayOfStructuresRightAlignment) { auto Style = getLLVMStyle(); Style.AlignArrayOfStructures = FormatStyle::AIAS_Right; + + verifyNoCrash("f({\n" +"ta

  1   2   3   4   5   6   7   8   9   10   >