[clang] [clang-format][NFC] Drop "Always" in "AlwaysBreakAfterReturnType". (PR #81591)

2024-02-13 Thread Owen Pan via cfe-commits
@@ -1130,14 +1129,13 @@ template <> struct MappingTraits { // AlwaysBreakAfterReturnType was not, initialize the latter from the // former for backwards compatibility. owenca wrote: ```suggestion // BreakAfterReturnType was not, initialize the

[clang] [clang-format][NFC] Drop "Always" in "AlwaysBreakAfterReturnType". (PR #81591)

2024-02-13 Thread Owen Pan via cfe-commits
@@ -1871,10 +1869,10 @@ FormatStyle getWebKitStyle() { FormatStyle getGNUStyle() { FormatStyle Style = getLLVMStyle(); Style.AlwaysBreakAfterDefinitionReturnType = FormatStyle::DRTBS_All; - Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_AllDefinitions;

[clang] [clang-format] Always add a space after #if and #elif (PR #81578)

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

[clang] 61c83e9 - Revert "[clang-format][NFC] Make LangOpts global in namespace Format"

2024-02-13 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-13T21:02:14-08:00 New Revision: 61c83e9491b2be71a54b255cdb11f65365245953 URL: https://github.com/llvm/llvm-project/commit/61c83e9491b2be71a54b255cdb11f65365245953 DIFF: https://github.com/llvm/llvm-project/commit/61c83e9491b2be71a54b255cdb11f65365245953.diff

[clang] [clang-format] Always add a space after #if and #elif (PR #81578)

2024-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/81578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Always insert a space between #if and l_paren (PR #81578)

2024-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81578 >From 02d2d44046a4cf6ca8c5bb1897b6677c01d81974 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 13 Feb 2024 00:03:19 -0800 Subject: [PATCH] [clang-format] Always add a space after #if and #elif Fixes #81569.

[clang] [clang-format] Always insert a space between #if and l_paren (PR #81578)

2024-02-13 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/81578 Fixes #81569. >From 2292ccb78839a90a15215b11c473fcbfc47aa00c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 13 Feb 2024 00:03:19 -0800 Subject: [PATCH] [clang-format] Always insert a space between #if and

[clang] [clang-format] Rename option AlwaysBreakAfterReturnType. (PR #80827)

2024-02-12 Thread Owen Pan via cfe-commits
owenca wrote: Feel free to open another PR if you're interested.  https://github.com/llvm/llvm-project/pull/80827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Rename option AlwaysBreakAfterReturnType. (PR #80827)

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

[clang] [clang-format] Rename option AlwaysBreakAfterReturnType. (PR #80827)

2024-02-12 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/80827 >From 3c3e167711dccfcc0a56c5b465b20c17854451a4 Mon Sep 17 00:00:00 2001 From: rmarker Date: Tue, 6 Feb 2024 21:53:20 +1030 Subject: [PATCH 1/2] [clang-format] Rename option AlwaysBreakAfterReturnType. ---

[clang] [clang-format] Don't remove parentheses in macro definitions (PR #81444)

2024-02-12 Thread Owen Pan via cfe-commits
owenca wrote: > Any hope that this lands in 18.1? Thanks anyway! Most likely. https://github.com/llvm/llvm-project/pull/81444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't remove parentheses in macro definitions (PR #81444)

2024-02-12 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 4af24d4ab765 https://github.com/llvm/llvm-project/pull/81444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't remove parentheses in macro definitions (PR #81444)

2024-02-12 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/81444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't remove parentheses in macro definitions (PR #81444)

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

[clang] [clang-format] Rename option AlwaysBreakAfterReturnType. (PR #80827)

2024-02-12 Thread Owen Pan via cfe-commits
@@ -677,6 +677,23 @@ TEST(ConfigParseTest, ParsesConfiguration) { " AfterControlStatement: false", BraceWrapping.AfterControlStatement, FormatStyle::BWACS_Never); + Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All; +

[clang] 7f40c5c - Reland "[clang-format] Update FormatToken::isSimpleTypeSpecifier() (#80241)"

2024-02-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-12T00:10:24-08:00 New Revision: 7f40c5cc4e15a0a67b031f13370afc342a5dc14b URL: https://github.com/llvm/llvm-project/commit/7f40c5cc4e15a0a67b031f13370afc342a5dc14b DIFF: https://github.com/llvm/llvm-project/commit/7f40c5cc4e15a0a67b031f13370afc342a5dc14b.diff

[clang] 33108fa - Reverted due to wrong commit message

2024-02-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-12T00:07:47-08:00 New Revision: 33108fae9020cb49577fc3ee0aed219cc581f82a URL: https://github.com/llvm/llvm-project/commit/33108fae9020cb49577fc3ee0aed219cc581f82a DIFF: https://github.com/llvm/llvm-project/commit/33108fae9020cb49577fc3ee0aed219cc581f82a.diff

[clang] f5d71b7 - Reland "[clang-format][NFC] Make LangOpts global in namespace Format (#81390)"

2024-02-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-12T00:04:34-08:00 New Revision: f5d71b79fe978f1e70f4a41adfd15f65dec6e210 URL: https://github.com/llvm/llvm-project/commit/f5d71b79fe978f1e70f4a41adfd15f65dec6e210 DIFF: https://github.com/llvm/llvm-project/commit/f5d71b79fe978f1e70f4a41adfd15f65dec6e210.diff

[clang] [clang-format] Don't remove parentheses in macro definitions (PR #81444)

2024-02-11 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/81444 Closes #81399. >From 9d91878e9cb65ab67de8251976ee748ed03fc2b6 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 11 Feb 2024 23:28:25 -0800 Subject: [PATCH] [clang-format] Don't remove parentheses in macro

[clang] 0091893 - [clang-format] Undo the change to TestLexer() in commit 32e65b0b8a74

2024-02-11 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-11T22:51:18-08:00 New Revision: 00918933fc4e181fe3c74006d81d7a598c2227b3 URL: https://github.com/llvm/llvm-project/commit/00918933fc4e181fe3c74006d81d7a598c2227b3 DIFF: https://github.com/llvm/llvm-project/commit/00918933fc4e181fe3c74006d81d7a598c2227b3.diff

[clang] 32e65b0 - Reland "[clang-format][NFC] Make LangOpts global in namespace Format (#81390)"

2024-02-11 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-11T22:01:23-08:00 New Revision: 32e65b0b8a743678974c7ca7913c1d6c41bb0772 URL: https://github.com/llvm/llvm-project/commit/32e65b0b8a743678974c7ca7913c1d6c41bb0772 DIFF: https://github.com/llvm/llvm-project/commit/32e65b0b8a743678974c7ca7913c1d6c41bb0772.diff

[clang] 3dc8ef6 - Revert "[clang-format][NFC] Make LangOpts global in namespace Format (#81390)"

2024-02-11 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-11T13:08:28-08:00 New Revision: 3dc8ef677d7d05116a0bf6524eb38b02ca6ba042 URL: https://github.com/llvm/llvm-project/commit/3dc8ef677d7d05116a0bf6524eb38b02ca6ba042 DIFF: https://github.com/llvm/llvm-project/commit/3dc8ef677d7d05116a0bf6524eb38b02ca6ba042.diff

[clang] [clang-format][NFC] Make LangOpts global in namespace Format (PR #81390)

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

[clang] 5aec939 - [clang-format][NFC] Keep Operator== sorted in Format.h

2024-02-11 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-11T02:15:57-08:00 New Revision: 5aec9392674572fa5a06283173a6a739742d261d URL: https://github.com/llvm/llvm-project/commit/5aec9392674572fa5a06283173a6a739742d261d DIFF: https://github.com/llvm/llvm-project/commit/5aec9392674572fa5a06283173a6a739742d261d.diff

[clang] [clang-format][NFC] Make LangOpts global in namespace Format (PR #81390)

2024-02-10 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81390 >From 37a6723b2c9b95c0556ca53992192795e74c27ce Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 10 Feb 2024 17:14:19 -0800 Subject: [PATCH 1/3] [clang-format][NFC] Make LangOpts global in namespace Format ---

[clang] [clang-format][NFC] Make LangOpts global in namespace Format (PR #81390)

2024-02-10 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81390 >From 37a6723b2c9b95c0556ca53992192795e74c27ce Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 10 Feb 2024 17:14:19 -0800 Subject: [PATCH 1/2] [clang-format][NFC] Make LangOpts global in namespace Format ---

[clang] [clang-format][NFC] Make LangOpts global in namespace Format (PR #81390)

2024-02-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/81390 None >From 37a6723b2c9b95c0556ca53992192795e74c27ce Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 10 Feb 2024 17:14:19 -0800 Subject: [PATCH] [clang-format][NFC] Make LangOpts global in namespace Format

[clang] [clang-format] Rename option AlwaysBreakAfterReturnType. (PR #80827)

2024-02-10 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/80827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakAfterReturnType option to deprecate AlwaysBreakAfterReturnType. (PR #80827)

2024-02-09 Thread Owen Pan via cfe-commits
owenca wrote: See the follow-up commit 7664ddf88112 to #81093. https://github.com/llvm/llvm-project/pull/80827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7664ddf - [clang-format][NFC] Drop "Always" in "AlwaysBreakTemplateDeclarations"

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T20:18:24-08:00 New Revision: 7664ddf8811242295abb837640cad8dd8cefb5e8 URL: https://github.com/llvm/llvm-project/commit/7664ddf8811242295abb837640cad8dd8cefb5e8 DIFF: https://github.com/llvm/llvm-project/commit/7664ddf8811242295abb837640cad8dd8cefb5e8.diff

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

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

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-09 Thread Owen Pan via cfe-commits
owenca wrote: > I'd go contrary to your > [comment](https://github.com/llvm/llvm-project/pull/80827#issuecomment-1935386091) > and rename the attribute. Because otherwise you still have the contradiction > within the code. I was not against renaming the attribute there. I just wanted it to

[clang] 02362b1 - [clang-format] Check token size in QualifierFixerTest.cpp

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T02:14:50-08:00 New Revision: 02362b1ad1c07a01714b195d769400dd40dbfd04 URL: https://github.com/llvm/llvm-project/commit/02362b1ad1c07a01714b195d769400dd40dbfd04 DIFF: https://github.com/llvm/llvm-project/commit/02362b1ad1c07a01714b195d769400dd40dbfd04.diff

[clang] 245d772 - Revert "[clang-format] Fix an out-of-bounds bug uncovered by 763139afc19d"

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T01:53:47-08:00 New Revision: 245d7727d51548c3d5d867b69b1f9b1efff2502e URL: https://github.com/llvm/llvm-project/commit/245d7727d51548c3d5d867b69b1f9b1efff2502e DIFF: https://github.com/llvm/llvm-project/commit/245d7727d51548c3d5d867b69b1f9b1efff2502e.diff

[clang] 5609bd8 - Revert "[clang-format] Update FormatToken::isSimpleTypeSpecifier() (#80241)"

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T01:52:41-08:00 New Revision: 5609bd83c3bd39a7522b05b32decc9e3c8ad08ae URL: https://github.com/llvm/llvm-project/commit/5609bd83c3bd39a7522b05b32decc9e3c8ad08ae DIFF: https://github.com/llvm/llvm-project/commit/5609bd83c3bd39a7522b05b32decc9e3c8ad08ae.diff

[clang] 173e674 - [clang-format] Fix an out-of-bounds bug uncovered by 763139afc19d

2024-02-09 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-09T00:21:09-08:00 New Revision: 173e674ba55eb93e8af43f2eece7feffe9954b34 URL: https://github.com/llvm/llvm-project/commit/173e674ba55eb93e8af43f2eece7feffe9954b34 DIFF: https://github.com/llvm/llvm-project/commit/173e674ba55eb93e8af43f2eece7feffe9954b34.diff

[clang] [clang-format][docs] Fix version (PR #81185)

2024-02-08 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: https://github.com/owenca approved this pull request. Good catch! https://github.com/llvm/llvm-project/pull/81185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Add BreakAfterReturnType option to deprecate AlwaysBreakAfterReturnType. (PR #80827)

2024-02-08 Thread Owen Pan via cfe-commits
@@ -1010,7 +1010,8 @@ struct FormatStyle { /// \version 3.7 DefinitionReturnTypeBreakingStyle AlwaysBreakAfterDefinitionReturnType; - /// The function declaration return type breaking style to use. + /// The function declaration return type breaking style to use. This

[clang] [clang-format] Add BreakAfterReturnType option to deprecate AlwaysBreakAfterReturnType. (PR #80827)

2024-02-08 Thread Owen Pan via cfe-commits
owenca wrote: @rmarker we only need to change the user-facing part and should leave the internal naming unchanged (at least in this patch) in order to have the smallest diff possible. I've added the support for deprecating/renaming top-level struct-type options to `dump_format_style.py` in

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81093 >From b9463c6664227edd6e579840292389909be04ab2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 7 Feb 2024 22:43:15 -0800 Subject: [PATCH 1/3] [clang-format] Rename option AlwaysBreakTemplateDeclarations Drop

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #80241)

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

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-07 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 8f6e13e6da84 https://github.com/llvm/llvm-project/pull/80628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/80628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/81093 >From b9463c6664227edd6e579840292389909be04ab2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 7 Feb 2024 22:43:15 -0800 Subject: [PATCH 1/2] [clang-format] Rename option AlwaysBreakTemplateDeclarations Drop

[clang] [clang-format] Rename option AlwaysBreakTemplateDeclarations (PR #81093)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/81093 Drop the "Always" prefix to remove the self-contradiction. >From b9463c6664227edd6e579840292389909be04ab2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 7 Feb 2024 22:43:15 -0800 Subject: [PATCH]

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/80628 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations (PR #80569)

2024-02-07 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/80569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-06 Thread Owen Pan via cfe-commits
@@ -1,5 +1,8 @@ +// RUN: clang-format -assume-filename=foo.m -dump-config | FileCheck %s owenca wrote: Yes, because it wouldn't make a difference before and after the patch. I don't think we can use lit to test that behavior (i.e., not waiting for an EOF) of

[clang] a628f68 - Revert "[clang] Mark clang-format-ignore.cpp as unsupported on Windows"

2024-02-06 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-06T09:00:15-08:00 New Revision: a628f68a9c4ce6f3dcd0c8bb3650db45671ed15a URL: https://github.com/llvm/llvm-project/commit/a628f68a9c4ce6f3dcd0c8bb3650db45671ed15a DIFF: https://github.com/llvm/llvm-project/commit/a628f68a9c4ce6f3dcd0c8bb3650db45671ed15a.diff

[clang] [clang-format] Add MainIncludeChar option. (PR #78752)

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

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-02-06 Thread Owen Pan via cfe-commits
owenca wrote: Probably. See #80628 for a fix. https://github.com/llvm/llvm-project/pull/79051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/80628 >From d49f94ca7de184fb7859a2d6d3f85e9b9adcc041 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 4 Feb 2024 18:29:42 -0800 Subject: [PATCH 1/2] [clang-format] Fix a regression in dumping the config Commit

[clang] [clang-format] Fix a regression in dumping the config (PR #80628)

2024-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/80628 Commit d813af73f70f addressed a regression introduced by commit 3791b3fca6ea but caused `clang-format -dump-config` to "hang". This patch reverts changes to ClangFormat.cpp by both 3791b3fca6ea and d813af73f70f

[clang] [Format] Fix detection of languages when reading from stdin (PR #79051)

2024-02-04 Thread Owen Pan via cfe-commits
owenca wrote: @bhamiltoncx Thanks for the fix! Nevertheless, it seems that this triggered a new regression. See #80621. https://github.com/llvm/llvm-project/pull/79051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-02-04 Thread Owen Pan via cfe-commits
@@ -24160,6 +24160,14 @@ TEST_F(FormatTest, AlternativeOperators) { verifyFormat("int a compl(5);"); verifyFormat("int a not(5);"); + verifyFormat("v(not)"); + verifyFormat("v(not!)"); + verifyFormat("Symbol(not, None)"); + verifyFormat("Symbol(not!, None)"); + +

[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

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

[clang] [clang-format] Handle doxygen commands starting with \ (PR #80381)

2024-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/80381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle doxygen commands starting with \ (PR #80381)

2024-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/80381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle doxygen commands starting with \ (PR #80381)

2024-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca deleted https://github.com/llvm/llvm-project/pull/80381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle doxygen commands starting with \ (PR #80381)

2024-02-04 Thread Owen Pan via cfe-commits
@@ -1909,6 +1909,14 @@ TEST_F(FormatTestComments, ReflowsComments) { "// @param arg", getLLVMStyleWithColumns(20))); + // Don't reflow lines starting with '\'. + EXPECT_EQ("// long long long\n" owenca wrote: Can you

[clang] [clang-format] Handle doxygen commands starting with \ (PR #80381)

2024-02-04 Thread Owen Pan via cfe-commits
@@ -1909,6 +1909,14 @@ TEST_F(FormatTestComments, ReflowsComments) { "// @param arg", getLLVMStyleWithColumns(20))); + // Don't reflow lines starting with '\'. + EXPECT_EQ("// long long long\n" +"// long\n" +"//

[clang] [clang-format] Fix a bug in AnnotatingParser::rParenEndsCast() (PR #79549)

2024-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca demilestoned https://github.com/llvm/llvm-project/pull/79549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in AnnotatingParser::rParenEndsCast() (PR #79549)

2024-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca unassigned https://github.com/llvm/llvm-project/pull/79549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in AnnotatingParser::rParenEndsCast() (PR #79549)

2024-02-04 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick f826f55b2ab6 https://github.com/llvm/llvm-project/pull/79549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in AnnotatingParser::rParenEndsCast() (PR #79549)

2024-02-04 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/79549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations (PR #80569)

2024-02-03 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/80569 >From 89ab06f93817a6d0e68f0549cae8836e6fd17612 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 3 Feb 2024 16:01:49 -0800 Subject: [PATCH] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations Closes

[clang] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations (PR #80569)

2024-02-03 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/80569 >From 4ce4a4ff922f393398bf62746fc59749f1679247 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 3 Feb 2024 16:01:49 -0800 Subject: [PATCH] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations Closes

[clang] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations (PR #80569)

2024-02-03 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/80569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add Leave to AlwaysBreakTemplateDeclarations (PR #80569)

2024-02-03 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/80569 Now with a8279a8bc541, we can make the update. >From 45b720cbda6b08ca55b7d131bb0541f38f36e7c9 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 3 Feb 2024 16:01:49 -0800 Subject: [PATCH] [clang-format] Add

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-02 Thread Owen Pan via cfe-commits
owenca wrote: I don't think the buildkite failure is related to this PR, but I like to wait for a couple of days before merging in case others have any comments. https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list

[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

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

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
@@ -9906,12 +9944,16 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) { verifyFormat("class B {\n" " int f() { return 1; }\n" " int g();\n" + " long\n" + " f::br();\n"

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
@@ -9938,12 +9984,16 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) { "return 1;\n" " }\n" " int g();\n" + " long\n" + " f::br();\n"

[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: Looks good otherwise. https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
@@ -9906,12 +9944,16 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) { verifyFormat("class B {\n" " int f() { return 1; }\n" " int g();\n" + " long\n" + " f::br();\n"

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
@@ -9938,12 +9984,16 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) { "return 1;\n" " }\n" " int g();\n" + " long\n" + " f::br();\n"

[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
@@ -9906,12 +9944,16 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) { verifyFormat("class B {\n" " int f() { return 1; }\n" " int g();\n" + " long\n" + " f::br();\n"

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
@@ -9920,13 +9962,17 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) { verifyFormat("class C {\n" " int f() { return 1; }\n" " int g();\n" + " long\n" + " f::br();\n"

[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-01 Thread Owen Pan via cfe-commits
@@ -914,16 +914,31 @@ struct FormatStyle { /// Different ways to break after the function definition or /// declaration return type. enum ReturnTypeBreakingStyle : int8_t { -/// Break after return type automatically. -/// ``PenaltyReturnTypeOnItsOwnLine`` is

[clang] [clang-format] Allow decltype in requires clause (PR #78847)

2024-01-31 Thread Owen Pan via cfe-commits
owenca wrote: Should we merge this patch? https://github.com/llvm/llvm-project/pull/78847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Add AllowShortType and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-31 Thread Owen Pan via cfe-commits
@@ -922,8 +922,39 @@ struct FormatStyle { /// }; /// int f(); /// int f() { return 1; } +/// int LongName:: +/// AnotherLongName(); /// \endcode RTBS_None, +/// Break after return type automatically. +/// This mode doesn't

[clang] [polly] [clang-format] Add AllowShortType and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: There is no need to update the release notes for new option values. https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[polly] [clang] [clang-format] Add AllowShortType and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-31 Thread Owen Pan via cfe-commits
@@ -922,8 +922,39 @@ struct FormatStyle { /// }; /// int f(); /// int f() { return 1; } +/// int LongName:: +/// AnotherLongName(); /// \endcode RTBS_None, +/// Break after return type automatically. +/// This mode doesn't

[clang] [polly] [clang-format] Add AllowShortType and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-31 Thread Owen Pan via cfe-commits
@@ -922,8 +922,39 @@ struct FormatStyle { /// }; /// int f(); /// int f() { return 1; } +/// int LongName:: +/// AnotherLongName(); /// \endcode owenca wrote: Change the comments (lines 917-927) to something like the

[clang] [polly] [clang-format] Add AllowShortType and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[polly] [clang] [clang-format] Add AllowShortType and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-31 Thread Owen Pan via cfe-commits
@@ -922,8 +922,39 @@ struct FormatStyle { /// }; /// int f(); /// int f() { return 1; } +/// int LongName:: +/// AnotherLongName(); /// \endcode RTBS_None, +/// Break after return type automatically. +/// This mode doesn't

[polly] [clang] [clang-format] Add AllowShortType and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-01-31 Thread Owen Pan via cfe-commits
owenca wrote: > Now that we've got both options, should we keep them? Currently, `None` > sometimes forbids breaking after short return types and sometimes allows it > and just bases things off the penalty configuration. I feel like there will > be some people who use `None` who would want

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #79115)

2024-01-31 Thread Owen Pan via cfe-commits
owenca wrote: See #80241. https://github.com/llvm/llvm-project/pull/79115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #79115)

2024-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/79115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #80241)

2024-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/80241 Now with a8279a8bc541, we can make the update. >From fda19165bc1195be01159c7d071839822ff3f929 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 31 Jan 2024 20:43:29 -0800 Subject: [PATCH] [clang-format] Update

[clang] [clang-format] Simplify the AfterPlacementOperator option (PR #79796)

2024-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/79796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Move isSimpleTypeSpecifier() from Sema to Token (PR #80101)

2024-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/80101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Move isSimpleTypeSpecifier() from Sema to Token (PR #80101)

2024-01-31 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/80101 >From f3ad3ceebba663615e75b5a6fc8969f4a98a03ea Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 30 Jan 2024 19:11:30 -0800 Subject: [PATCH 1/2] [clang][NFC] Move isSimpleTypeSpecifier() from Sema to Token So

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #79115)

2024-01-30 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/79115 >From f3ad3ceebba663615e75b5a6fc8969f4a98a03ea Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 30 Jan 2024 19:11:30 -0800 Subject: [PATCH 1/2] [clang][NFC] Move isSimpleTypeSpecifier() from Sema to Token So

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #79115)

2024-01-30 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/79115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #79115)

2024-01-30 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/79115 >From f3ad3ceebba663615e75b5a6fc8969f4a98a03ea Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 30 Jan 2024 19:11:30 -0800 Subject: [PATCH] [clang][NFC] Move isSimpleTypeSpecifier() from Sema to Token So that

[clang] [clang][NFC] Move isSimpleTypeSpecifier() from Sema to Token (PR #80101)

2024-01-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/80101 So that it can be used by clang-format. >From f3ad3ceebba663615e75b5a6fc8969f4a98a03ea Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 30 Jan 2024 19:11:30 -0800 Subject: [PATCH] [clang][NFC] Move

[clang] [clang-format] Handles Elaborated type specifier for enum in trailing return (PR #80085)

2024-01-30 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/80085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [compiler-rt] [llvm] [clang] [libc] [clang] Improved isSimpleTypeSpecifier (PR #79037)

2024-01-30 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/79037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   9   10   >