[clang] c69ec70 - [clang-format][NFC] Don't use clang-format style in config files

2024-01-10 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-01-10T00:58:35-08:00 New Revision: c69ec700adec315b3daa55742f2ef655242fa297 URL: https://github.com/llvm/llvm-project/commit/c69ec700adec315b3daa55742f2ef655242fa297 DIFF: https://github.com/llvm/llvm-project/commit/c69ec700adec315b3daa55742f2ef655242fa297.diff LOG:

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-01-10 Thread Owen Pan via cfe-commits
owenca wrote: > The change is done 👍 Is the code formatting check broken? See [here](https://github.com/llvm/llvm-project/pull/76059#issuecomment-1865850011). https://github.com/llvm/llvm-project/pull/77456 ___ cfe-commits mailing list cfe-commits@li

[clang] [ClangFormat] Fix formatting bugs. (PR #76245)

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

[clang] [clang-format] Don't apply severe penalty if no possible column formats (PR #76675)

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

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

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

[clang] [clang-format] Fix crash involving array designators (PR #77045)

2024-01-10 Thread Owen Pan via cfe-commits
owenca wrote: > While I was trying to find a minimal reproducer to the bug, I accidentally > found that this patch fix another crash, and doesn't fix the linked issue. Can you open another pull request to [fix](https://github.com/llvm/llvm-project/pull/77045#discussion_r1442578220) the other

[clang] [clang-format] Fix crash involving array designators (PR #77045)

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

[clang] [clang-format] Handle possible crash in `getCells` (PR #77723)

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

[clang] [clang-format] Don't allow casts in front of ampamp (PR #77704)

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

[clang] [clang-format] Optimize processing .clang-format-ignore files (PR #76733)

2024-01-10 Thread Owen Pan via cfe-commits
owenca wrote: > This still breaks tests on win: http://45.33.8.238/win/88113/step_7.txt I didn't get any email for the failure. Is this a regular LLVM buildbot? If it chokes on `grep -Fx`, can you (or whoever has access to it) install a POSIX-compliant grep? It seems all other Windows buildbot

[clang] [clang-format] Add SpaceInParensOption for __attribute__ keyword (PR #77522)

2024-01-11 Thread Owen Pan via cfe-commits
owenca wrote: > The __attribute((specifier-list)) currently is formatted based on the > SpacesInParensOptions.Other (previously, SpacesInParentheses). This change > allows finer control over addition of spaces between the consecutive parens, > and between the inner parens and the list of attri

[clang] 492cb7b - [clang-format] Fix a crash in qualifier alignment

2022-04-01 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-04-01T17:30:59-07:00 New Revision: 492cb7bf91648058f3fc9ca37f9383786f7ce718 URL: https://github.com/llvm/llvm-project/commit/492cb7bf91648058f3fc9ca37f9383786f7ce718 DIFF: https://github.com/llvm/llvm-project/commit/492cb7bf91648058f3fc9ca37f9383786f7ce718.diff LOG:

[clang] 0a0cc3c - [clang-format] Don't unwrap lines preceded by line comments

2022-03-14 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-03-14T19:16:29-07:00 New Revision: 0a0cc3c58a74f9574d9f4df244e3bd0a8e805945 URL: https://github.com/llvm/llvm-project/commit/0a0cc3c58a74f9574d9f4df244e3bd0a8e805945 DIFF: https://github.com/llvm/llvm-project/commit/0a0cc3c58a74f9574d9f4df244e3bd0a8e805945.diff LOG:

[clang] 7fb2d9f - [clang-format] Fix crashes due to missing l_paren

2022-03-16 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-03-16T01:45:20-07:00 New Revision: 7fb2d9f9b5efaf15c10711826b496ee65f70491d URL: https://github.com/llvm/llvm-project/commit/7fb2d9f9b5efaf15c10711826b496ee65f70491d DIFF: https://github.com/llvm/llvm-project/commit/7fb2d9f9b5efaf15c10711826b496ee65f70491d.diff LOG:

[clang] eaef54f - [clang-format] Revert a feature in RemoveBracesLLVM

2022-02-03 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-02-03T02:56:09-08:00 New Revision: eaef54f21388350ca72d4dadf33728f70566e531 URL: https://github.com/llvm/llvm-project/commit/eaef54f21388350ca72d4dadf33728f70566e531 DIFF: https://github.com/llvm/llvm-project/commit/eaef54f21388350ca72d4dadf33728f70566e531.diff LOG:

[clang] 35f7dd6 - [clang-format][NFC] Fix a bug in setting type FunctionLBrace

2022-02-04 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-02-04T11:36:30-08:00 New Revision: 35f7dd601d33219fafa2c0d308e187df3e36847a URL: https://github.com/llvm/llvm-project/commit/35f7dd601d33219fafa2c0d308e187df3e36847a DIFF: https://github.com/llvm/llvm-project/commit/35f7dd601d33219fafa2c0d308e187df3e36847a.diff LOG:

[clang] [clang-format][NFC] Eliminate the IsCpp parameter in all functions (PR #84599)

2024-03-13 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/84599 >From 43238d58ff490073c13ff621faddceb89b05b22e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 8 Mar 2024 19:47:54 -0800 Subject: [PATCH 1/2] [clang-format][NFC] Eliminate the IsCpp parameter in all functions

[clang] [clang-format][NFC] Eliminate the IsCpp parameter in all functions (PR #84599)

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

[clang] c3a1eb6 - Reland [clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)

2024-03-14 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-14T19:44:40-07:00 New Revision: c3a1eb6207d85cb37ea29306481b40c9f6402309 URL: https://github.com/llvm/llvm-project/commit/c3a1eb6207d85cb37ea29306481b40c9f6402309 DIFF: https://github.com/llvm/llvm-project/commit/c3a1eb6207d85cb37ea29306481b40c9f6402309.diff LOG:

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-14 Thread Owen Pan via cfe-commits
owenca wrote: Can you add lit test cases? https://github.com/llvm/llvm-project/pull/84346 ___ 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 annotating FunctionDeclarationName (PR #85361)

2024-03-14 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/85361 A name is not a FunctionDeclarationName if it's preceded by an Objective-C keyword. >From fa46932f5f0c0281d75907a3da795b2f343a8e70 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 14 Mar 2024 20:16:39 -0700 Su

[clang] [clang-format] Fix a bug in annotating FunctionDeclarationName (PR #85361)

2024-03-14 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/85361 ___ 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 annotating FunctionDeclarationName (PR #85361)

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

[clang] 426e694 - [clang-format][NFC] Delete redundant and extraneous #include lines

2024-03-15 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-15T20:51:57-07:00 New Revision: 426e6945897afbec01c042bec4771522a2aac176 URL: https://github.com/llvm/llvm-project/commit/426e6945897afbec01c042bec4771522a2aac176 DIFF: https://github.com/llvm/llvm-project/commit/426e6945897afbec01c042bec4771522a2aac176.diff LOG:

[clang] Revert "[clang-format][NFC] Eliminate the IsCpp parameter in all functions" (PR #85353)

2024-03-15 Thread Owen Pan via cfe-commits
owenca wrote: See e.g. https://lab.llvm.org/buildbot/#/builders/272/builds/11332. https://github.com/llvm/llvm-project/pull/85353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly parse C++11 attributes in enum specifiers (PR #85498)

2024-03-15 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/85498 Fixes #85476. >From 89c06a9acfebffa4f9e65c6d683c3c46774edc88 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 15 Mar 2024 22:14:01 -0700 Subject: [PATCH] [clang-format] Correctly parse C++11 attributes in enum

[clang] [clang-format] Fix a bug in SpaceInEmptyBlock option (PR #85508)

2024-03-16 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/85508 Fixes #84695. >From d15f3ddd2f9aef02f1706e7af64e76359a89 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 16 Mar 2024 02:18:33 -0700 Subject: [PATCH] [clang-format] Fix a bug in SpaceInEmptyBlock option Fi

[clang] 5ac784d - Revert "[clang-format][NFC] Don't use clang-format style in config files"

2024-03-16 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-16T02:39:37-07:00 New Revision: 5ac784d1d00ce4733d07c3432ff946497a249e51 URL: https://github.com/llvm/llvm-project/commit/5ac784d1d00ce4733d07c3432ff946497a249e51 DIFF: https://github.com/llvm/llvm-project/commit/5ac784d1d00ce4733d07c3432ff946497a249e51.diff LOG:

[clang] [clang-format] Correctly parse C++11 attributes in enum specifiers (PR #85498)

2024-03-16 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/85498 ___ 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 SpaceInEmptyBlock option (PR #85508)

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

[clang] b92d6dd - [clang-format][NFC] Delete 100+ redundant #include lines in .cpp files

2024-03-16 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-16T22:24:11-07:00 New Revision: b92d6dd704d789240685a336ad8b25a9f381b4cc URL: https://github.com/llvm/llvm-project/commit/b92d6dd704d789240685a336ad8b25a9f381b4cc DIFF: https://github.com/llvm/llvm-project/commit/b92d6dd704d789240685a336ad8b25a9f381b4cc.diff LOG:

[clang] f3c5278 - [clang-format][NFC] Don't export IsCpp in Format.h

2024-03-17 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-17T00:36:12-07:00 New Revision: f3c5278efa3b783ada9e7a34b751cf4c5b864535 URL: https://github.com/llvm/llvm-project/commit/f3c5278efa3b783ada9e7a34b751cf4c5b864535 DIFF: https://github.com/llvm/llvm-project/commit/f3c5278efa3b783ada9e7a34b751cf4c5b864535.diff LOG:

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #85564)

2024-03-17 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/85564 None >From 3b9e25b8509aa6847838148fd2959569c94c4a0f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 17 Mar 2024 01:08:07 -0700 Subject: [PATCH] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() --- cla

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #85564)

2024-03-17 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/85564 >From 3b9e25b8509aa6847838148fd2959569c94c4a0f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 17 Mar 2024 01:08:07 -0700 Subject: [PATCH 1/2] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() --- clang

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

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

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

2024-03-17 Thread Owen Pan via cfe-commits
@@ -11450,6 +11450,11 @@ TEST_F(FormatTest, UnderstandsNewAndDelete) { "void new (link p);\n" "void delete (link p);"); + verifyFormat("{ p->delete(); }\n" + "{ p->new(); }", + "{ p->delete (); }\n" + "{

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

2024-03-17 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: I forgot to submit my review. https://github.com/llvm/llvm-project/pull/85470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 55a02d1 - [clang-format][NFC] Minor changes to a unit test in 8e5de66af3da

2024-03-17 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-17T21:37:32-07:00 New Revision: 55a02d10d9819b485f67546c6c1aee856a3cd62c URL: https://github.com/llvm/llvm-project/commit/55a02d10d9819b485f67546c6c1aee856a3cd62c DIFF: https://github.com/llvm/llvm-project/commit/55a02d10d9819b485f67546c6c1aee856a3cd62c.diff LOG:

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #85564)

2024-03-17 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/85564 >From 3b9e25b8509aa6847838148fd2959569c94c4a0f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 17 Mar 2024 01:08:07 -0700 Subject: [PATCH 1/3] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() --- clang

[clang] a2527e0 - [clang-format] Put erroneously removed braces back into a unit test

2024-03-18 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-18T20:22:42-07:00 New Revision: a2527e06d77766d00e83ecb7988844aae7088bb1 URL: https://github.com/llvm/llvm-project/commit/a2527e06d77766d00e83ecb7988844aae7088bb1 DIFF: https://github.com/llvm/llvm-project/commit/a2527e06d77766d00e83ecb7988844aae7088bb1.diff LOG:

[clang] [clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (PR #85470)

2024-03-18 Thread Owen Pan via cfe-commits
@@ -11450,6 +11450,11 @@ TEST_F(FormatTest, UnderstandsNewAndDelete) { "void new (link p);\n" "void delete (link p);"); + verifyFormat("{ p->delete(); }\n" + "{ p->new(); }", + "{ p->delete (); }\n" + "{

[clang] [clang-format][NFC] Eliminate the IsCpp parameter in all functions (PR #84599)

2024-03-18 Thread Owen Pan via cfe-commits
owenca wrote: Can you provide more info about the failed use cases? https://github.com/llvm/llvm-project/pull/84599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix FormatToken::isSimpleTypeSpecifier() (PR #85564)

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

[clang] 6f31cf5 - Revert "[clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)"

2024-03-19 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-19T18:06:59-07:00 New Revision: 6f31cf51dfdc2c317ba8149d57d2ffb583403833 URL: https://github.com/llvm/llvm-project/commit/6f31cf51dfdc2c317ba8149d57d2ffb583403833 DIFF: https://github.com/llvm/llvm-project/commit/6f31cf51dfdc2c317ba8149d57d2ffb583403833.diff LOG:

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-20 Thread Owen Pan via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: cat %s | not clang-format --fail-on-incomplete-format | FileCheck %s +// RUN: cat %s | clang-format | FileCheck %s +int a([) {} + +// CHECK: int a([) {} owenca wrote: It's missing the EOF. Also, use a single hyphen for the option like oth

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-20 Thread Owen Pan via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: cat %s | not clang-format --fail-on-incomplete-format | FileCheck %s +// RUN: cat %s | clang-format | FileCheck %s +int a([) {} + +// CHECK: int a([) {} owenca wrote: > Done. It took me quite a while but `-style=LLVM` is also required as

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

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

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-20 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/84346 >From e19f49ca2660cbcd64fb81aae0428e899d61cac6 Mon Sep 17 00:00:00 2001 From: Roberto Bampi Date: Thu, 7 Mar 2024 18:10:56 +0100 Subject: [PATCH 1/3] [clang-format] Add --fail-on-incomplete-format. At the moment

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

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

[clang] [clang-forma] Support `PointerAlignment: Left` for pointer to member (PR #86253)

2024-03-22 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/86253 Fixes #85761. >From d1a3b743b808a64f022897dfd832ce9a25c8f2c0 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 21 Mar 2024 23:43:23 -0700 Subject: [PATCH] [clang-forma] Support `PointerAlignment: Left` for point

[clang] [clang-forma] Support `PointerAlignment: Left` for pointer to member (PR #86253)

2024-03-22 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/86253 >From d1a3b743b808a64f022897dfd832ce9a25c8f2c0 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 21 Mar 2024 23:43:23 -0700 Subject: [PATCH 1/2] [clang-forma] Support `PointerAlignment: Left` for pointer to memb

[clang] [clang-forma] Support `PointerAlignment` for pointers to members (PR #86253)

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

[clang] [clang-forma] Support `PointerAlignment` for pointers to members (PR #86253)

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

[clang] 47423e9 - [clang-format][NFC] Clean up IsQualifiedPointerOrReference in TokenAnnotator

2024-03-23 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-23T02:24:56-07:00 New Revision: 47423e9827abfdcc6b10ce41618965861b0e69a4 URL: https://github.com/llvm/llvm-project/commit/47423e9827abfdcc6b10ce41618965861b0e69a4 DIFF: https://github.com/llvm/llvm-project/commit/47423e9827abfdcc6b10ce41618965861b0e69a4.diff LOG:

[clang] [clang-format] Fix a crash with AlignArrayOfStructures option (PR #86420)

2024-03-23 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/86420 Fixes #86109. >From 682323acb1007308f55bf023e4d1657f268b55d1 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 23 Mar 2024 22:23:46 -0700 Subject: [PATCH] [clang-format] Fix a crash with AlignArrayOfStructures o

[clang] [clang-format] Fix a crash with AlignArrayOfStructures option (PR #86420)

2024-03-23 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/86420 >From 2c131e544578072e349ba853543cc60816421a5e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 23 Mar 2024 22:23:46 -0700 Subject: [PATCH] [clang-format] Fix a crash with AlignArrayOfStructures option Fixes #8

[clang] [clang-format] Fix a crash with AlignArrayOfStructures option (PR #86420)

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

[clang] [clang-format] Handle C++ Core Guidelines suppression tags (PR #86458)

2024-03-24 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/86458 Fixes #86451. >From 4149b046f97a4416041e2cd3fe5f134abed2f5d9 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 24 Mar 2024 16:06:14 -0700 Subject: [PATCH] [clang-format] Handle C++ Core Guidelines suppression ta

[clang] [clang-format] Handle C++ Core Guidelines suppression tags (PR #86458)

2024-03-25 Thread Owen Pan via cfe-commits
@@ -4827,6 +4827,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, Right.is(TT_TemplateOpener)) { return true; } +if (Left.is(tok::identifier) && Right.is(tok::numeric_constant) && +Right.TokenText[0] == '.') {

[clang] [clang-format] Fix a regression in annotating TrailingReturnArrow (PR #86624)

2024-03-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/86624 Fixes #86559. >From 5ba6a0adcf9de7035dd195f0b83ada39019b7e12 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 25 Mar 2024 21:13:04 -0700 Subject: [PATCH] [clang-format] Fix a regression in annotating TrailingR

[clang] [clang-format] Handle C++ Core Guidelines suppression tags (PR #86458)

2024-03-26 Thread Owen Pan via cfe-commits
@@ -4827,6 +4827,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, Right.is(TT_TemplateOpener)) { return true; } +if (Left.is(tok::identifier) && Right.is(tok::numeric_constant) && +Right.TokenText[0] == '.') {

[clang] [clang-format] Exit clang-format-diff only after all diffs are printed (PR #86776)

2024-03-26 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/86776 None >From 216681ceb6346b56e8013935b2d3938bde5039ea Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 26 Mar 2024 23:27:51 -0700 Subject: [PATCH] [clang-format] Exit clang-format-diff only after all diffs are p

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

2024-03-26 Thread Owen Pan via cfe-commits
owenca wrote: See #86776. 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] Exit clang-format-diff only after all diffs are printed (PR #86776)

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

[clang] [clang-format] Handle C++ Core Guidelines suppression tags (PR #86458)

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

[clang] [clang-format] Exit clang-format-diff only after all diffs are printed (PR #86776)

2024-03-27 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/86776 ___ 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 annotating TrailingReturnArrow (PR #86624)

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

[clang] [clang-format] Lambda parameter should be passed by const reference (PR #87306)

2024-04-01 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/87306 Closes #87254. >From 91edc2bff0ea98e39b5614ae91ab562c1135b6e7 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 1 Apr 2024 20:08:21 -0700 Subject: [PATCH] [clang-format] Lambda parameter should be passed by cons

[clang] [clang-format] Fix a regression in annotating TrailingReturnArrow (PR #86624)

2024-04-01 Thread Owen Pan via cfe-commits
owenca wrote: Ping @mydeveloperday @HazardyKnusperkeks @rymiel https://github.com/llvm/llvm-project/pull/86624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [polly] [clang-format] Correctly annotate block braces of empty ctors/dtors (PR #82097)

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

[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 LOG:

[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 cl

[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-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] 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-forma

[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] 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] 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] 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] 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] 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 #81

[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][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 https://lists.llv

[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 LOG:

[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 LOG:

[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 LOG:

[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 LOG:

[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 be

[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] 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 LOG:

[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] [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][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][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 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] 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 LOG:

[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] 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 LOG:

[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 LOG:

[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 LOG:

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