[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-15 Thread Owen Pan via cfe-commits
@@ -325,13 +325,30 @@ bool ContinuationIndenter::canBreak(const LineState &State) { if (Current.isMemberAccess() && CurrentState.ContainsUnwrappedBuilder) return false; - // Don't create a 'hanging' indent if there are multiple blocks in a single - // statement and we

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

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

[clang] [clang-format][NFC] Upgrade IndentBraces option to a struct (PR #143663)

2025-06-15 Thread Owen Pan via cfe-commits
owenca wrote: > I don't understand this fix, it needs tests to show what you are doing See https://github.com/llvm/llvm-project/pull/143249#discussion_r2136966951 and https://github.com/llvm/llvm-project/pull/143249#issuecomment-2957775336. IMO, the current `BraceWrapping.IndentBraces` boolean

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

2025-06-15 Thread Owen Pan via cfe-commits
@@ -706,42 +706,48 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, const FormatToken &Previous = *State.NextToken->Previous; auto &CurrentState = State.Stack.back(); - bool DisallowLineBreaksOnThisLine = - Style.LambdaBodyIndentati

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

2025-06-15 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/144255 >From e959ae809abb119effd17534c199f1e6c174d749 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 15 Jun 2025 01:42:20 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Clean up DisallowLineBreaks lambda See also h

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

2025-06-15 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/144255 >From e959ae809abb119effd17534c199f1e6c174d749 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 15 Jun 2025 01:42:20 -0700 Subject: [PATCH] [clang-format][NFC] Clean up DisallowLineBreaks lambda See also https

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

2025-06-15 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/144255 See also https://github.com/llvm/llvm-project/pull/141576/files#r2141808121 >From d75bb33657f4fd2bd7ceea8aabfc1fd4d8a4eb25 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 15 Jun 2025 01:42:20 -0700 Subject: [

[clang] [clang-format] Fix a bug in annotating braces (PR #144095)

2025-06-14 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/144095 ___ 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 braces (PR #144095)

2025-06-13 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/144095 ___ 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 braces (PR #144095)

2025-06-13 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/144095 Stop looking for function decls after hitting a BK_BracedInit l_brace. Fixes #144057. >From 8fa1829548708152118b8f24b9069580f92a750d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 13 Jun 2025 08:30:21 -0700

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

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

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

2025-06-12 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143302 >From 68f668608d800c1411fd259be569bd3db36d1b12 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 8 Jun 2025 00:36:08 -0700 Subject: [PATCH] [clang-format] Fix an off-by-1 bug with -length option Also validate t

[clang] Reland "[clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp" (PR #143477)

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

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-11 Thread Owen Pan via cfe-commits
@@ -325,13 +325,30 @@ bool ContinuationIndenter::canBreak(const LineState &State) { if (Current.isMemberAccess() && CurrentState.ContainsUnwrappedBuilder) return false; - // Don't create a 'hanging' indent if there are multiple blocks in a single - // statement and we

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-11 Thread Owen Pan via cfe-commits
@@ -325,13 +325,30 @@ bool ContinuationIndenter::canBreak(const LineState &State) { if (Current.isMemberAccess() && CurrentState.ContainsUnwrappedBuilder) return false; - // Don't create a 'hanging' indent if there are multiple blocks in a single - // statement and we

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-11 Thread Owen Pan via cfe-commits
@@ -325,13 +325,30 @@ bool ContinuationIndenter::canBreak(const LineState &State) { if (Current.isMemberAccess() && CurrentState.ContainsUnwrappedBuilder) return false; - // Don't create a 'hanging' indent if there are multiple blocks in a single - // statement and we

[clang] Reland "[clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp" (PR #143477)

2025-06-10 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp" (PR #143477)

2025-06-10 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp" (PR #143477)

2025-06-10 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143477 >From 7f745330975e0e360e9a42b9d57c3e3afa3680f8 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 7 Jun 2025 20:59:53 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (#143

[clang] [clang-format] Add options to control wrapped lambda brace indent. (PR #143249)

2025-06-10 Thread Owen Pan via cfe-commits
owenca wrote: See https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options. IMO, when it's difficult to name the new options, it will be hard for people to understand what they do. @mydeveloperday WDYT? https://github.com/llvm/llvm-project/pull/143249 _

[clang] [clang-format] Add options to control wrapped lambda brace indent. (PR #143249)

2025-06-09 Thread Owen Pan via cfe-commits
@@ -1547,6 +1547,38 @@ struct FormatStyle { bool BeforeWhile; /// Indent the wrapped braces themselves. bool IndentBraces; +/// Indent nested wrapped lambda braces. owenca wrote: If we allow this new option, I want a separate NFC patch that upg

[clang] Reapply "[clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp" (PR #143477)

2025-06-09 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Cleanup (PR #143477)

2025-06-09 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Cleanup (PR #143477)

2025-06-09 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143477 None >From 7f745330975e0e360e9a42b9d57c3e3afa3680f8 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 7 Jun 2025 20:59:53 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp

[clang] [clang-format] Parse JSON outermost l_brace as braced list brace (PR #143327)

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

[clang] [clang-format] Parse JSON outermost l_brace as braced list brace (PR #143327)

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

[clang] [clang-format] Parse JSON outermost l_brace as braced list brace (PR #143327)

2025-06-08 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143327 Fix github.com/llvm/llvm-project/issues/65400#issuecomment-2922181979 >From ab36d65d7c0f677b196ac3aa0cf976fb483fad98 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 1 Jun 2025 22:35:14 -0700 Subject: [PATCH]

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

2025-06-08 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143302 >From 68f668608d800c1411fd259be569bd3db36d1b12 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 8 Jun 2025 00:36:08 -0700 Subject: [PATCH] [clang-format] Fix an off-by-1 bug with -length option Also validate t

[clang] [clang-format] Fix an off-by-1 bug with -length option (PR #143302)

2025-06-08 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143302 Also validate the argument value. Fixes #56245 >From 30e0165a2d5c7ee8fc6b7f1edcf9322e18f4334e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 8 Jun 2025 00:36:08 -0700 Subject: [PATCH] [clang-format] Fix an

[clang] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (PR #143236)

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

[clang] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (PR #143236)

2025-06-07 Thread Owen Pan via cfe-commits
@@ -284,27 +284,23 @@ static bool fillRanges(MemoryBuffer *Code, errs() << "error: number of -offset and -length arguments must match.\n"; return true; } - for (unsigned i = 0, e = Offsets.size(); i != e; ++i) { -if (Offsets[i] >= Code->getBufferSize()) { -

[clang] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (PR #143236)

2025-06-07 Thread Owen Pan via cfe-commits
@@ -284,27 +284,23 @@ static bool fillRanges(MemoryBuffer *Code, errs() << "error: number of -offset and -length arguments must match.\n"; owenca wrote: Actually, we can achieve that by handling `Offsets.size() == 1 && Lengths.empty()` separately. https://

[clang] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (PR #143236)

2025-06-07 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143236 >From 1ece3adee540295efbe04fc74876efd39549e577 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 6 Jun 2025 23:10:18 -0700 Subject: [PATCH 1/3] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp ---

[clang] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (PR #143236)

2025-06-07 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143236 >From 1ece3adee540295efbe04fc74876efd39549e577 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 6 Jun 2025 23:10:18 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp ---

[clang] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp (PR #143236)

2025-06-06 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143236 None >From 1ece3adee540295efbe04fc74876efd39549e577 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 6 Jun 2025 23:10:18 -0700 Subject: [PATCH] [clang-format][NFC] Clean up fillRanges() in ClangFormat.cpp ---

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

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

[clang] [clang-format] Fix Microsoft calling convensions preventing function names from being marked TT_StartOfName (PR #143047)

2025-06-05 Thread Owen Pan via cfe-commits
owenca wrote: See #143083. https://github.com/llvm/llvm-project/pull/143047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle function decls with MS calling conventions (PR #143083)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143083 None >From 6f319be22826718c82b027c605885d6b95ed5689 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 23:48:47 -0700 Subject: [PATCH] [clang-format] Handle function decls with MS calling conventions

[clang] [clang-format] Handle requires clause following a pointer type (PR #142893)

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

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] More consumeToken() cleanup (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/143063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/143063 >From 9c2e7a25245259af7ecdf5815fb0b6314b23a7d4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 21:39:49 -0700 Subject: [PATCH] [clang-format] More consumeToken() cleanup similar to #142104 --- cla

[clang] [clang-format] More consumeToken() cleanup similar to #142104 (PR #143063)

2025-06-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/143063 None >From af43a40d33dd7af17b852cfd60df3c9cd1594935 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 5 Jun 2025 21:39:49 -0700 Subject: [PATCH] [clang-format] More consumeToken() cleanup similar to #142104 --

[clang] [clang-format] Handle requires clause following a pointer type (PR #142893)

2025-06-05 Thread Owen Pan via cfe-commits
owenca wrote: > For all sane code this works. Although there are valid codes where a star can > preceed a requires expression. Sure, but I think that's also true for the existing `tok::greater` and `tok::amp` cases. https://github.com/llvm/llvm-project/pull/142893

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 7bf5862dbfda590282f50b14e6d7d5f990bf1900 https://github.com/llvm/llvm-project/pull/142337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

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

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/142337 >From d088a50da78e67ee182074af594dd4f230d98357 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 1 Jun 2025 23:56:32 -0700 Subject: [PATCH 1/2] [clang-format] Correctly annotate token-pasted function decl names

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
@@ -3848,6 +3848,8 @@ static bool isFunctionDeclarationName(const LangOptions &LangOpts, } else { if (Current.isNot(TT_StartOfName) || Current.NestingLevel != 0) return false; +while (Next && Next->startsSequence(tok::hashhash, tok::identifier)) ---

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/142337 >From d088a50da78e67ee182074af594dd4f230d98357 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 1 Jun 2025 23:56:32 -0700 Subject: [PATCH 1/2] [clang-format] Correctly annotate token-pasted function decl names

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
@@ -2257,6 +2257,13 @@ TEST_F(TokenAnnotatorTest, UnderstandsFunctionDeclarationNames) { EXPECT_TOKEN(Tokens[1], tok::identifier, TT_FunctionDeclarationName); EXPECT_TOKEN(Tokens[2], tok::l_paren, TT_FunctionDeclarationLParen); + Tokens = annotate("#define FUNC(foo, bar)

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
owenca wrote: @prj- I understand. If you use `AlignFunctionDeclarations`, you might see formatting changes as the first token in a token-pasted function decl name was not annotated correctly before this patch. https://github.com/llvm/llvm-project/pull/142337 ___

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
owenca wrote: > Looking forward to testing this out! I already tested it with your reproducer in https://github.com/llvm/llvm-project/pull/142251#issuecomment-2928718530. https://github.com/llvm/llvm-project/pull/142337 ___ cfe-commits mailing list c

[clang] [clang-format] Handle token-pasted function decl names (PR #142251)

2025-06-02 Thread Owen Pan via cfe-commits
owenca wrote: I've reverted this patch and sent in another one #142337. https://github.com/llvm/llvm-project/pull/142251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

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

[clang] [clang-format] Correctly annotate token-pasted function decl names (PR #142337)

2025-06-02 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/142337 Fix #142178 >From d088a50da78e67ee182074af594dd4f230d98357 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 1 Jun 2025 23:56:32 -0700 Subject: [PATCH] [clang-format] Correctly annotate token-pasted function de

[clang] c5cce48 - Revert "[clang-format] Handle token-pasted function decl names (#142251)"

2025-06-01 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-06-01T23:32:00-07:00 New Revision: c5cce4861cb011d10af7f6afba4176682f5f862f URL: https://github.com/llvm/llvm-project/commit/c5cce4861cb011d10af7f6afba4176682f5f862f DIFF: https://github.com/llvm/llvm-project/commit/c5cce4861cb011d10af7f6afba4176682f5f862f.diff LOG:

[clang] [clang-format] Handle token-pasted function decl names (PR #142251)

2025-05-31 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/142251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle token-pasted function decl names (PR #142251)

2025-05-31 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 29f79ea3c59649f7686a09845665660c25ca3f9b https://github.com/llvm/llvm-project/pull/142251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle token-pasted function decl names (PR #142251)

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

[clang] [clang-format] Handle token-pasted function decl names (PR #142251)

2025-05-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/142251 Fix #142178 >From 8c5af1f937d6bdbd92628c41a685ed420604ce0a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 30 May 2025 21:48:54 -0700 Subject: [PATCH] [clang-format] Handle token-pasted function decl names F

[clang] [clang-format] Handle bit-field colon of non-numeric-constant size (PR #142110)

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

[clang] [clang-format] Handle bit-field colon of non-numeric-constant size (PR #142110)

2025-05-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/142110 Fix #142050 >From 9cf70104e03372be9122d44a87694cd04b9b34c9 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 30 May 2025 01:52:31 -0700 Subject: [PATCH] [clang-format] Handle bit-field colon of non-numeric-cons

[clang] [clang-format][NFC] Clean up AnnotatingParser::consumeToken() (PR #142104)

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

[clang] [clang-format][NFC] Clean up AnnotatingParser::consumeToken() (PR #142104)

2025-05-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/142104 None >From b81d2513a22b7492c7d0948235747539628ac768 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 30 May 2025 01:05:23 -0700 Subject: [PATCH] [clang-format][NFC] Clean up AnnotatingParser::consumeToken() -

[clang] [clang-format] Handle .h files for LK_C and LK_ObjC (PR #141714)

2025-05-28 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/141714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle .h files for LK_C and LK_ObjC (PR #141714)

2025-05-28 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/141714 >From 2d30adbd7bcce89c157e5b3eb517854cfbd35f48 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 27 May 2025 20:50:56 -0700 Subject: [PATCH] [clang-format] Handle .h files for LK_C and LK_ObjC Fix #137792 ---

[clang] [clang-format] Handle .h files for LK_C and LK_ObjC (PR #141714)

2025-05-27 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/141714 Fix #137792 >From 0afd41acb56fced29a7f8865b19cf2da95aaa26d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 27 May 2025 20:50:56 -0700 Subject: [PATCH] [clang-format] Handle .h files for LK_C and LK_ObjC Fix

[clang] [Format] Use llvm::count_if (NFC) (PR #141518)

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

[clang] [clang-format] Handle Java text blocks (PR #141334)

2025-05-25 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick b7f5950bb3b97eac979925a3bbf015530c26962e https://github.com/llvm/llvm-project/pull/141334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Java text blocks (PR #141334)

2025-05-25 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/141334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Java text blocks (PR #141334)

2025-05-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/141334 >From 470eca4b4d963bf5c1ba87fb2f22620eb717c848 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 23 May 2025 23:21:12 -0700 Subject: [PATCH 1/2] [clang-format] Handle Java text blocks Fix #61954 --- clang/lib/

[clang] [clang-format] Handle Java text blocks (PR #141334)

2025-05-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/141334 >From 470eca4b4d963bf5c1ba87fb2f22620eb717c848 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 23 May 2025 23:21:12 -0700 Subject: [PATCH 1/2] [clang-format] Handle Java text blocks Fix #61954 --- clang/lib/

[clang] [clang-format] Handle Java text blocks (PR #141334)

2025-05-23 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/141334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)

2025-05-23 Thread Owen Pan via cfe-commits
owenca wrote: Should `Leave` apply to the hash only or also to the name after the hash? https://github.com/llvm/llvm-project/pull/139750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Java text blocks (PR #141334)

2025-05-23 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/141334 Fix #61954 >From 470eca4b4d963bf5c1ba87fb2f22620eb717c848 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 23 May 2025 23:21:12 -0700 Subject: [PATCH] [clang-format] Handle Java text blocks Fix #61954 --- cl

[clang] [clang-format][NFC] FormatTokenLexer.cpp cleanup (PR #141202)

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

[clang] [clang-format][NFC] FormatTokenLexer.cpp cleanup (PR #141202)

2025-05-22 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/141202 None >From 9f6342e8d20ebb7a55f77385f57ada832a69e441 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 22 May 2025 23:27:29 -0700 Subject: [PATCH] [clang-format][NFC] FormatTokenLexer.cpp cleanup --- clang/lib

[clang] [clang-format] Handle raw string literals containing JSON code (PR #140666)

2025-05-21 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 0dfdf7efbfe347517eb4c7f544043a71af4e4a25 https://github.com/llvm/llvm-project/pull/140666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle raw string literals containing JSON code (PR #140666)

2025-05-21 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/140666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Merge short inline function in macro definition body (PR #140366)

2025-05-21 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 6da2acf8e99ec517bfbe498af2519d29834e2583 https://github.com/llvm/llvm-project/pull/140366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Merge short inline function in macro definition body (PR #140366)

2025-05-21 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/140366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix the indent of StartOfName after AttributeMacro (PR #140361)

2025-05-21 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 0cac25bcf5a246eb8a1f02d5041731ae9a6f00e0 https://github.com/llvm/llvm-project/pull/140361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix the indent of StartOfName after AttributeMacro (PR #140361)

2025-05-21 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/140361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ClangFormat: Insert braces & newline for Chromium (PR #140888)

2025-05-21 Thread Owen Pan via cfe-commits
@@ -1892,6 +1892,9 @@ FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) { ChromiumStyle.IncludeStyle.IncludeBlocks = tooling::IncludeStyle::IBS_Preserve; + ChromiumStyle.InsertBraces = true; owenca wrote: See https://reviews.llvm.org/

[clang] ClangFormat: Insert braces & newline for Chromium (PR #140888)

2025-05-21 Thread Owen Pan via cfe-commits
@@ -5904,7 +5904,7 @@ TEST_F(FormatTest, MacrosWithoutTrailingSemicolon) { getLLVMStyleWithColumns(60)); verifyFormat("VISIT_GL_CALL(GenBuffers, void, (GLsizei n, GLuint* buffers), " - "(n, buffers))", + "(n, buffers))\n",

[clang] [clang-format][NFC] Minor efficiency cleanup (PR #140835)

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

[clang] [clang-format][NFC] Minor efficiency cleanup (PR #140835)

2025-05-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/140835 None >From ca6a78c3c078fca61fe5ae60566adc4bf17503d2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 20 May 2025 19:45:15 -0700 Subject: [PATCH] [clang-format][NFC] Minor efficiency cleanup --- clang/lib/For

[clang] [clang-format] Handle raw string literals containing JSON code (PR #140666)

2025-05-20 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/140666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle raw string literals containing JSON code (PR #140666)

2025-05-20 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/140666 >From 7c1c0d2ca413503d81cd71e6a005a608cdec479d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 19 May 2025 20:18:53 -0700 Subject: [PATCH 1/2] [clang-format] Handle raw string literals containing JSON code F

[clang] [clang-format] Handle raw string literals containing JSON code (PR #140666)

2025-05-19 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/140666 Fix #65400 >From 7c1c0d2ca413503d81cd71e6a005a608cdec479d Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 19 May 2025 20:18:53 -0700 Subject: [PATCH] [clang-format] Handle raw string literals containing JSON

[clang] 65400 (PR #140661)

2025-05-19 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/140661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 65400 (PR #140661)

2025-05-19 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/140661 None >From 186ac09017c78cbff5a34a5b8768b6df5b8d0546 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 18 May 2025 23:23:04 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Upgrade SortIncludes option to a struct

[clang] [clang-format][NFC] Upgrade SortIncludes option to a struct (PR #140497)

2025-05-19 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/140497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix the indent of StartOfName after AttributeMacro (PR #140361)

2025-05-19 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/140361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Merge short inline function in macro definition body (PR #140366)

2025-05-19 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/140366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Upgrade SortIncludes option to a struct (PR #140497)

2025-05-18 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/140497 This allows adding other suboptions e.g. IgnoreExtension in #137840. >From 186ac09017c78cbff5a34a5b8768b6df5b8d0546 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 18 May 2025 23:23:04 -0700 Subject: [PATCH]

[clang] [clang-format] Merge short inline function in macro definition body (PR #140366)

2025-05-17 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/140366 Fix #62356 >From f8fb158f193d0064ca3c05c081f2f96d1f882c2c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 17 May 2025 02:39:51 -0700 Subject: [PATCH] [clang-format] Merge short inline function in macro defin

[clang] [clang-format] Fix the indent of StartOfName after AttributeMacro (PR #140361)

2025-05-17 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/140361 >From 0b1d1c67566371290715daf8c02a48262ab624ad Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 16 May 2025 22:50:35 -0700 Subject: [PATCH] [clang-format] Fix the indent of StartOfName after AttributeMacro Fi

[clang] [clang-format] Fix the indent of StartOfName after AttributeMacro (PR #140361)

2025-05-17 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/140361 Fix #139510 >From f7528c42b4c1cce3a04722d2eadca3b81305cc5e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 16 May 2025 22:50:35 -0700 Subject: [PATCH] [clang-format] Fix the indent of StartOfName after Attri

[clang] [git-clang-format] add fallback style argument option (PR #137609)

2025-05-14 Thread Owen Pan via cfe-commits
@@ -189,6 +189,13 @@ def main(): default=config.get("clangformat.style", None), help="passed to clang-format", ), +p.add_argument( owenca wrote: Please move this to just before `--force` to keep the options sorted. (We can also move `-

  1   2   3   4   5   6   7   8   9   10   >