[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

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

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: Yep. https://github.com/llvm/llvm-project/pull/89016 ___ 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-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick a7f4576ff4e2 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] Fix a regression in ContinuationIndenter (PR #88414)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick d61edecbfd09 https://github.com/llvm/llvm-project/pull/88414 ___ 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 BK_BracedInit (PR #87450)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 7c9c38eaa9b7 https://github.com/llvm/llvm-project/pull/87450 ___ 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 braces in macros (PR #87953)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 58323de2e5ed https://github.com/llvm/llvm-project/pull/87953 ___ 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 braces in macros (PR #87953)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: Ah, I still need to do that. https://github.com/llvm/llvm-project/pull/87953 ___ 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 braces in macros (PR #87953)

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: @tstellar somehow this is not in 18.1.4, but the LLVM Release Status in the Projects box says "Status: Done". Did I miss something here? https://github.com/llvm/llvm-project/pull/87953 ___ cfe-commits mailing list

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

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

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

2024-04-19 Thread Owen Pan via cfe-commits
owenca wrote: > I've done all your changes in a second commit just to be able to keep track > of my previous changes; but I am actually not sure how your suggested > modifications are any different from mine? Well, I admit it looks a bit > better, but it works the same? Or am I missing

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

2024-04-19 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/77456 >From d4fd95374a82361e3dbfcd7a5d87c37da4542d2b Mon Sep 17 00:00:00 2001 From: NorthBlue333 Date: Tue, 9 Jan 2024 14:01:14 +0100 Subject: [PATCH 1/4] [clang-format] Do not update cursor pos if no includes

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

2024-04-19 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/77456 >From d4fd95374a82361e3dbfcd7a5d87c37da4542d2b Mon Sep 17 00:00:00 2001 From: NorthBlue333 Date: Tue, 9 Jan 2024 14:01:14 +0100 Subject: [PATCH 1/3] [clang-format] Do not update cursor pos if no includes

[clang] [clang-format] Fix a bug in annotating CastRParen before unary && (PR #89346)

2024-04-18 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/89346 Also fix a bug in annotating TrailingAnnotation. Closes #61233. >From 53b2846e35e0e8541ca0c3c6f63d31821dc9441c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 18 Apr 2024 21:21:47 -0700 Subject: [PATCH]

[clang] [clang-format] Annotate ampamp after new/delete as BinaryOperator (PR #89033)

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

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

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

[clang] [clang-format] Annotate ampamp after new/delete as BinaryOperator (PR #89033)

2024-04-17 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/89033 Fixes #78789. >From 0e2d91d20a1c318868f2e791d859a047b83f0277 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 17 Apr 2024 00:39:36 -0700 Subject: [PATCH] [clang-format] Annotate ampamp after new/delete as

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

2024-04-16 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/89016 Reverts commit d68826dfbd98, which changes the previous default behavior of always breaking before a stream insertion operator `<<` if both operands are string literals. Also reverts the related commits

[clang] [polly] [clang-format] Revert breaking stream operators to previous default (PR #89016)

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

[clang] [clang-format] revert to string << string handling to previous default (PR #88490)

2024-04-14 Thread Owen Pan via cfe-commits
owenca wrote: Please see https://github.com/llvm/llvm-project/issues/88483#issuecomment-2053928993 and Conversation in #69859, which was the first attempt at adding an option for breaking consecutive stream insertion operations. Instead of handling everything specified in

[clang] [clang-format] Don't break between string literal operands of << (PR #69871)

2024-04-13 Thread Owen Pan via cfe-commits
owenca wrote: > I wish we'd made this removal an option rather than just removing it, what we > are seeing is reasonably formatted json or xml being streamed out is now > poorly written > > ```c++ > osjson << "{\n" ><<" \"name\": \"value\",\n" ><<" \"key\": \"abc\", \n" >

[clang] [clang-format] Fix a regression in ContinuationIndenter (PR #88414)

2024-04-12 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/88414 ___ 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 ContinuationIndenter (PR #88414)

2024-04-11 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/88414 ___ 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 ContinuationIndenter (PR #88414)

2024-04-11 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/88414 Commit d06b92391513 caused a regression that breaks after a block comment adjacent to a function paramter that follows. Fixes #86573. >From 2ec43f6dc1fafed9d7fc324eeacfa07133af3abd Mon Sep 17 00:00:00 2001

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Owen Pan via cfe-commits
owenca wrote: @HighCommander4 Thanks! https://github.com/llvm/llvm-project/pull/88352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

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

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/88352 >From a070f07c16ddacc1aaf7591a1f7c129bf6abc90a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 10 Apr 2024 21:22:05 -0700 Subject: [PATCH] [clangd] Fix test case due to clang-format bug fix See commit

[clang-tools-extra] [clangd] Fix test case due to clang-format bug fix (PR #88352)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/88352 See commit 51f1681424f1. >From 3ecf27d15646345f43703f5a361bd9766307ebf4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 10 Apr 2024 21:22:05 -0700 Subject: [PATCH] [clangd] Fix test case due to clang-format

[clang] [clang-format] Don't merge a short block for SBS_Never (PR #88238)

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

[clang] [clang-format] Don't merge a short block for SBS_Never (PR #88238)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/88238 >From 4122a4f0e189afa7aff1010f0061b4f4d2b2a627 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 10 Apr 2024 00:03:21 -0700 Subject: [PATCH 1/2] [clang-format] Don't merge a short block for SBS_Never Also fix

[clang] [clang-format] Don't merge a short block for SBS_Never (PR #88238)

2024-04-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/88238 Also fix unit tests. Fixes #87484. >From 4122a4f0e189afa7aff1010f0061b4f4d2b2a627 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 10 Apr 2024 00:03:21 -0700 Subject: [PATCH] [clang-format] Don't merge a

[clang] [clang-format] instanceof is a keyword only in Java/JavaScript (PR #88085)

2024-04-09 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/88085 ___ 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 braces in macros (PR #87953)

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

[clang] 5c056b3 - [clang-format] Clean up unit tests from commit 13be0d4a34c4

2024-04-08 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-04-08T21:20:18-07:00 New Revision: 5c056b32350e834924356b1af78504d261d24e42 URL: https://github.com/llvm/llvm-project/commit/5c056b32350e834924356b1af78504d261d24e42 DIFF: https://github.com/llvm/llvm-project/commit/5c056b32350e834924356b1af78504d261d24e42.diff

[clang] [clang-format] instanceof is a keyword only in Java/JavaScript (PR #88085)

2024-04-08 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/88085 Fixes #87907. >From 0daef6caaac5d3779cda0d4cbbf9cd2514662b92 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 8 Apr 2024 20:29:26 -0700 Subject: [PATCH] [clang-format] instanceof is a keyword only in

[clang] [clang-format] Remove trailing newlines in TableGen formatting test. (PR #87983)

2024-04-08 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/87983 ___ 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 braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/87953 ___ 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 braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
owenca wrote: The polly formatting failure should be ignored as CI is using clang-format 18.1.1 instead of the version built from this patch. https://github.com/llvm/llvm-project/pull/87953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
@@ -538,16 +538,6 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { if (Style.Language == FormatStyle::LK_Proto) { ProbablyBracedList = NextTok->isOneOf(tok::comma, tok::r_square); } else { - // Skip NextTok over

[clang] [polly] [clang-format] Correctly annotate braces in macros (PR #87953)

2024-04-07 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/87953 Also fix unit tests and reformat polly. Fixes #86550. >From 6d0c7e5602a227b1b7310be46553aa689e6a93e7 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 7 Apr 2024 17:27:21 -0700 Subject: [PATCH] [clang-format]

[clang] [clang-format] Added unittest of TableGen formatting w.r.t. block type calculation. (PR #87924)

2024-04-07 Thread Owen Pan via cfe-commits
@@ -290,6 +290,16 @@ TEST_F(FormatTestTableGen, MultiClass) { "}\n"); } +TEST_F(FormatTestTableGen, MultiClassesWithPasteOperator) { + // This is a sensitive example for the handling of the paste operators in + // brace type calculation. +

[clang] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (PR #87868)

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

[clang] 684f27d - [clang-format][NFC] Use `is` instead of `getType() ==`

2024-04-06 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-04-06T01:51:45-07:00 New Revision: 684f27d37a6f1faf546a71bcb784b48c7fc8b7e0 URL: https://github.com/llvm/llvm-project/commit/684f27d37a6f1faf546a71bcb784b48c7fc8b7e0 DIFF: https://github.com/llvm/llvm-project/commit/684f27d37a6f1faf546a71bcb784b48c7fc8b7e0.diff

[clang] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (PR #87868)

2024-04-06 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/87868 >From 5c614fec2b54c146841a9ef3089dee1a63f72543 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 5 Apr 2024 22:45:47 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource

[clang] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource (PR #87868)

2024-04-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/87868 None >From 5c614fec2b54c146841a9ef3089dee1a63f72543 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 5 Apr 2024 22:45:47 -0700 Subject: [PATCH] [clang-format][NFC] Add getNextNonComment() to FormatTokenSource

[clang] 7702023 - [clang-format][NFC] Rename `kind` to `Kind`

2024-04-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-04-05T22:17:50-07:00 New Revision: 770202343ebce1f2bc0745c78e298e251f204bee URL: https://github.com/llvm/llvm-project/commit/770202343ebce1f2bc0745c78e298e251f204bee DIFF: https://github.com/llvm/llvm-project/commit/770202343ebce1f2bc0745c78e298e251f204bee.diff

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

2024-04-04 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 8de230093f58 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] [clang-format] Fix a regression in annotating BK_BracedInit (PR #87450)

2024-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/87450 ___ 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 BK_BracedInit (PR #87450)

2024-04-04 Thread Owen Pan via cfe-commits
https://github.com/owenca dismissed https://github.com/llvm/llvm-project/pull/87450 ___ 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] [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] [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

[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] 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] 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 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] Add ability for clang-format-diff to exit with non-0 status (PR #70883)

2024-03-27 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-27 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

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

[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 , Right.is(TT_TemplateOpener)) { return true; } +if (Left.is(tok::identifier) && Right.is(tok::numeric_constant) && +Right.TokenText[0] == '.') {

[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

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

[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

[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

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

[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

[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-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-21 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 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-21 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
@@ -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

[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

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

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

[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] [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 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 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-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() ---

[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

[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

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

[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

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

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

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

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