[clang] Improved is simple type specifier (PR #78903)

2024-01-22 Thread Owen Pan via cfe-commits
owenca wrote: > Here's the sort of approach I"m looking at @owenca Can you restore the clang-format files for this pull request? I'll open another PR that depends on this one. https://github.com/llvm/llvm-project/pull/78903 ___ cfe-commits mailing li

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-01-22 Thread Owen Pan via cfe-commits
owenca wrote: > You either have to use a new option, or adapt the documentation. Latter > clearly only refers to `C++11 attributes`, which `__attribute__(())` isn't. > > I don't think a new option is needed. > > When you are already at it, you may also consider handling `__declspec()`. +1. h

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

2024-01-22 Thread Owen Pan via cfe-commits
@@ -4842,19 +4842,19 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, return true; } if (Left.is(TT_UnaryOperator)) { -if (Right.isNot(tok::l_paren)) { +if (Right.isOneOf(tok::identifier, tok::numeric_constant)) { // The alternative

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

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

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

2024-01-22 Thread Owen Pan via cfe-commits
@@ -4842,19 +4842,19 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, return true; } if (Left.is(TT_UnaryOperator)) { -if (Right.isNot(tok::l_paren)) { +if (Right.isOneOf(tok::identifier, tok::numeric_constant)) { // The alternative

[clang] [clang-format] Fix a bug in ContinuationIndenter (PR #78921)

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

[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

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

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

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

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

2024-01-23 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/79115 Depends on #79037. >From 61a06b77e8e6f2b5c5a9a2aa0b7f46260545f5b4 Mon Sep 17 00:00:00 2001 From: Carl Peto Date: Mon, 22 Jan 2024 18:52:46 + Subject: [PATCH 1/2] [clang] - Sema::isSimpleTypeSpecifier return t

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

2024-01-23 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/79115 >From 6d11eaa2c9b5de0b42b82c6b52b35eca44b5d772 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 23 Jan 2024 02:35:09 -0800 Subject: [PATCH] [clang-format] Update FormatToken::isSimpleTypeSpecifier() --- clang/

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

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

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

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

[clang] 2172eea - [clang-format][NFC] Take a constant conjunct out of a loop condition

2023-10-18 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-18T17:37:41-07:00 New Revision: 2172eeaa52bec211b255e9cb4d8464a8908ff709 URL: https://github.com/llvm/llvm-project/commit/2172eeaa52bec211b255e9cb4d8464a8908ff709 DIFF: https://github.com/llvm/llvm-project/commit/2172eeaa52bec211b255e9cb4d8464a8908ff709.diff LOG:

[clang] b2f50b4 - [clang-format][NFC] Use UnwrappedLineParser::eof() for consistency

2023-10-19 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-19T13:38:49-07:00 New Revision: b2f50b49a8c45305d27f0393ee6248e3e8851788 URL: https://github.com/llvm/llvm-project/commit/b2f50b49a8c45305d27f0393ee6248e3e8851788 DIFF: https://github.com/llvm/llvm-project/commit/b2f50b49a8c45305d27f0393ee6248e3e8851788.diff LOG:

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-19 Thread Owen Pan via cfe-commits
@@ -491,11 +491,19 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { SmallVector LBraceStack; assert(Tok->is(tok::l_brace)); do { -// Get next non-comment token. -FormatToken *NextTok; -do { - NextTok = Tokens->getNextToken(); -

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-19 Thread Owen Pan via cfe-commits
owenca wrote: > Here's my solution to one of the regressions I caused (#68404) I don't think it's a regression. On the contrary, it actually exposed another bug. :) https://github.com/llvm/llvm-project/pull/69473 ___ cfe-commits mailing list cfe-com

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

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

[clang] [Windows] Add git-clang-format wrapper bat file (PR #69228)

2023-10-19 Thread Owen Pan via cfe-commits
owenca wrote: @mydeveloperday what do you think? https://github.com/llvm/llvm-project/pull/69228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-19 Thread Owen Pan via cfe-commits
@@ -491,11 +491,19 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { SmallVector LBraceStack; assert(Tok->is(tok::l_brace)); do { -// Get next non-comment token. -FormatToken *NextTok; -do { - NextTok = Tokens->getNextToken(); -

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

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

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

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

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-19 Thread Owen Pan via cfe-commits
@@ -491,11 +491,19 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) { SmallVector LBraceStack; assert(Tok->is(tok::l_brace)); do { -// Get next non-comment token. -FormatToken *NextTok; -do { - NextTok = Tokens->getNextToken(); -

[clang] 7c15dd6 - [clang-format] Add space in placement new expression

2023-10-20 Thread Owen Pan via cfe-commits
Author: Omar Ahmed Date: 2023-10-20T03:16:28-07:00 New Revision: 7c15dd60ec4549f53f1a51c5302c61f8a025a4a5 URL: https://github.com/llvm/llvm-project/commit/7c15dd60ec4549f53f1a51c5302c61f8a025a4a5 DIFF: https://github.com/llvm/llvm-project/commit/7c15dd60ec4549f53f1a51c5302c61f8a025a4a5.diff LO

[clang] [clang-format] Annotate do while while (PR #69707)

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

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

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

[clang] [Windows] Add git-clang-format wrapper bat file (PR #69228)

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

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: @@ -1118,16 +1121,39 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBe

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Björn_Schäpers?= Message-ID: In-Reply-To: @@ -1118,16 +1121,39 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBefore == 0

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: @@ -1118,16 +1121,39 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBe

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Björn_Schäpers?= Message-ID: In-Reply-To: https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/68743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: @@ -3102,7 +3102,9 @@ TEST_F(FormatTestComments, DontAlignNamespaceComments) { StringRef Input = "namespace A {\n" " TESTSUITE(B) {\n" "namespace C {\n" -

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/69814 None >From 78a2661ba7a18ecf8b09be71f6959fbc9fcf70fe Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 20 Oct 2023 23:01:38 -0700 Subject: [PATCH] [clang-format] Add a new style for the clang-format source code

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-20 Thread Owen Pan via cfe-commits
owenca wrote: I don't want to "advertise" this new style in the documentation but am willing to be overruled by the majority. https://github.com/llvm/llvm-project/pull/69814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-21 Thread Owen Pan via cfe-commits
owenca wrote: > What is your goal with that style? It was actually your [idea](https://reviews.llvm.org/D153208#4431239). 😉 https://github.com/llvm/llvm-project/pull/69814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-21 Thread Owen Pan via cfe-commits
owenca wrote: I was wondering myself. Will undo it before merging. https://github.com/llvm/llvm-project/pull/69814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-21 Thread Owen Pan via cfe-commits
owenca wrote: Yep. Each file will contain only `BasedOnStyle: clang-format`. https://github.com/llvm/llvm-project/pull/69814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-21 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/69814 >From 78a2661ba7a18ecf8b09be71f6959fbc9fcf70fe Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 20 Oct 2023 23:01:38 -0700 Subject: [PATCH 1/2] [clang-format] Add a new style for the clang-format source code -

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-21 Thread Owen Pan via cfe-commits
@@ -1118,16 +1121,48 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBefore == 0 && -Changes[I - 1].Tok->is(TT_NamespaceRBrace);

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

2023-10-22 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/69871 Fixes #44363. >From fc955bc2730b52093d1e6d2bdd2dbf0400879edf Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 22 Oct 2023 01:36:17 -0700 Subject: [PATCH] [clang-format] Don't break between string literal operan

[clang] [clang-format] Don't align comments over scopes (PR #68743)

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

[clang] 3e86cc4 - [clang-format][NFC] Simplify the logic in a return statement

2023-10-22 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-22T13:46:32-07:00 New Revision: 3e86cc4b864f609720c12cc97ff70a20aabb956f URL: https://github.com/llvm/llvm-project/commit/3e86cc4b864f609720c12cc97ff70a20aabb956f DIFF: https://github.com/llvm/llvm-project/commit/3e86cc4b864f609720c12cc97ff70a20aabb956f.diff LOG:

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

2023-10-22 Thread Owen Pan via cfe-commits
@@ -5118,10 +5118,6 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return true; if (Left.IsUnterminatedLiteral) return true; - if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) && owenca wrote: No, it sti

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-22 Thread Owen Pan via cfe-commits
@@ -1118,16 +1121,48 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBefore == 0 && -Changes[I - 1].Tok->is(TT_NamespaceRBrace);

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-22 Thread Owen Pan via cfe-commits
@@ -3191,20 +3198,150 @@ TEST_F(FormatTestComments, DontAlignNamespaceComments) { "}\n" "// Comment"; -#if 0 - // FIXME: The following comment is aligned with the namespace comment. verifyFormat("namespace A {\n" " int Foo;\n"

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

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

[clang] [clang-format] Don't alter SpacesRequiredBefore of finalized tokens (PR #69897)

2023-10-22 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/69897 Fixes #69237. >From 69e39f7e19e7f2538df0b8c6ba89d5efa493dd7b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 22 Oct 2023 23:15:08 -0700 Subject: [PATCH] [clang-format] Don't alter SpacesRequiredBefore of final

[clang] [clang-format] Don't alter SpacesRequiredBefore of finalized tokens (PR #69897)

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

[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

2023-10-23 Thread Owen Pan via cfe-commits
owenca wrote: Please add unit tests in `clang/unittests/Format/`. https://github.com/llvm/llvm-project/pull/69859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] unexpected break after binOp '<<' (PR #69859)

2023-10-23 Thread Owen Pan via cfe-commits
owenca wrote: > 2th solution is: Add new option that allowing specific behaviour, such as > "BreakAfterStreamOperator" or "BreakAfterLessLessOperator" with options [ > Leave | NoFitLine | All ]. We need a comprehensive solution to cover the following: - when to break - before or after the oper

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

2023-10-23 Thread Owen Pan via cfe-commits
owenca wrote: > I think adding the possibility of breaking '<<' is a good idea if it's > optional, what do u think? +1, but see also https://github.com/llvm/llvm-project/pull/69859#issuecomment-1776064714. https://github.com/llvm/llvm-project/pull/69871 ___

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

2023-10-23 Thread Owen Pan via cfe-commits
owenca wrote: > I think adding the possibility of breaking '<<' is a good idea if it's > optional, what do u think? +1, but see also https://github.com/llvm/llvm-project/pull/69859#issuecomment-1776064714. https://github.com/llvm/llvm-project/pull/69871 ___

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-23 Thread Owen Pan via cfe-commits
owenca wrote: @rymiel, please remove me from the authorship. I suggested code in numerous reviews and never expected to get co-authorship just because the authors took my suggestions. 😄 https://github.com/llvm/llvm-project/pull/69473 ___ cfe-commits

[clang] [clang-format] Allow default values for template parameters in lambda (PR #69052)

2023-10-23 Thread Owen Pan via cfe-commits
owenca wrote: @rymiel, thanks for the co-authorship, but I really didn't deserve it here! https://github.com/llvm/llvm-project/pull/69052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-24 Thread Owen Pan via cfe-commits
owenca wrote: > I didn't expect you to not want to be credited, but I'll respect your opinion! I meant you didn't need to add me to the authorship. 🙂 Anyway, I do appreciate it and think you should be the only author. > GitHub adds co-ownership automatically if using the web ui to commit a >

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

2023-10-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/69871 >From d12aee14e9d588c402e69e49aa9b33be7f940acb Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 22 Oct 2023 01:36:17 -0700 Subject: [PATCH] [clang-format] Don't break between string literal operands of << Fixe

[clang] 7bc1031 - Revert "[clang-format] Fix align consecutive declarations over function pointers"

2023-10-24 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-24T02:15:44-07:00 New Revision: 7bc1031c474ebb2216a5432273dafe4d1490fbce URL: https://github.com/llvm/llvm-project/commit/7bc1031c474ebb2216a5432273dafe4d1490fbce DIFF: https://github.com/llvm/llvm-project/commit/7bc1031c474ebb2216a5432273dafe4d1490fbce.diff LOG:

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

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

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-24 Thread Owen Pan via cfe-commits
@@ -3191,20 +3198,167 @@ TEST_F(FormatTestComments, DontAlignNamespaceComments) { "}\n" "// Comment"; -#if 0 - // FIXME: The following comment is aligned with the namespace comment. verifyFormat("namespace A {\n" " int Foo;\n"

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-25 Thread Owen Pan via cfe-commits
@@ -182,7 +182,7 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) { "int a; // This is unrelated")); EXPECT_EQ("class C {\n" " void f() { // This does something ..\n" -" } // awesome..\n" +"

[clang] [clang-format] Don't align comments over scopes (PR #68743)

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

[clang] 69209e3 - [clang-format] AllowShortCompoundRequirementOnASingleLine

2023-10-25 Thread Owen Pan via cfe-commits
Author: Backl1ght Date: 2023-10-25T05:13:50-07:00 New Revision: 69209e30a7168b0493d8fb34989ddccd8c574670 URL: https://github.com/llvm/llvm-project/commit/69209e30a7168b0493d8fb34989ddccd8c574670 DIFF: https://github.com/llvm/llvm-project/commit/69209e30a7168b0493d8fb34989ddccd8c574670.diff LOG

[clang] 23d6a6d - [clang-format] Fix the version for a newly added option

2023-10-25 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-25T05:45:32-07:00 New Revision: 23d6a6dfc1bc6e79bdcc48a59a0698a5b79262e9 URL: https://github.com/llvm/llvm-project/commit/23d6a6dfc1bc6e79bdcc48a59a0698a5b79262e9 DIFF: https://github.com/llvm/llvm-project/commit/23d6a6dfc1bc6e79bdcc48a59a0698a5b79262e9.diff LOG:

[clang] 265ed68 - [clang-format] Fix a JavaScript import order bug

2023-10-25 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-25T17:06:53-07:00 New Revision: 265ed6819409a9d76f112a601d48b971904921c8 URL: https://github.com/llvm/llvm-project/commit/265ed6819409a9d76f112a601d48b971904921c8 DIFF: https://github.com/llvm/llvm-project/commit/265ed6819409a9d76f112a601d48b971904921c8.diff LOG:

[clang] e3ecdf7 - [clang-format][NFC] Remove some extraneous newlines at end of test cases

2023-10-26 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-26T13:37:23-07:00 New Revision: e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2 URL: https://github.com/llvm/llvm-project/commit/e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2 DIFF: https://github.com/llvm/llvm-project/commit/e3ecdf7d3b7ec8fa2c3c594ff39b20788e75eaf2.diff LOG:

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-26 Thread Owen Pan via cfe-commits
owenca wrote: This would change the default for every other predefined style, which might be ok if there's no mention of breaking after C++11 attributes in those styles. https://github.com/llvm/llvm-project/pull/70360 ___ cfe-commits mailing list cfe-

[clang] 88934a8 - [clang-format][NFC] Remove extraneous newlines in some unit test files

2023-10-26 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-26T21:43:27-07:00 New Revision: 88934a82dced0116227e4ad9af8896d8fa0943b8 URL: https://github.com/llvm/llvm-project/commit/88934a82dced0116227e4ad9af8896d8fa0943b8 DIFF: https://github.com/llvm/llvm-project/commit/88934a82dced0116227e4ad9af8896d8fa0943b8.diff LOG:

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

2023-10-27 Thread Owen Pan via cfe-commits
owenca wrote: IMO, the new behavior is consistent with the [documentation](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#columnlimit) for `ColumnLimt: 0`. https://github.com/llvm/llvm-project/pull/69871 ___ cfe-commits mailing list cfe-com

[clang] 6c3bc91 - [clang-format][NFC] Remove more extraneous newlines in unit tests

2023-10-27 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-27T02:22:36-07:00 New Revision: 6c3bc910588f962e49470098ccc3b13c29cae493 URL: https://github.com/llvm/llvm-project/commit/6c3bc910588f962e49470098ccc3b13c29cae493 DIFF: https://github.com/llvm/llvm-project/commit/6c3bc910588f962e49470098ccc3b13c29cae493.diff LOG:

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-27 Thread Owen Pan via cfe-commits
owenca wrote: > [Google](https://google.github.io/styleguide/cppguide.html) is the only one > mentioning attributes: > > > Attributes, and macros that expand to attributes, appear at the very > > beginning of the function declaration or definition, before the return type: > > ```c++ > > ABSL_

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

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

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

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

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-27 Thread Owen Pan via cfe-commits
@@ -794,6 +794,7 @@ clang-format - Add ``AllowBreakBeforeNoexceptSpecifier`` option. - Add ``AllowShortCompoundRequirementOnASingleLine`` option. +- Change ``BreakAfterAttributes`` from ``Never`` to ``Leave`` in LLVM style owenca wrote: Full stop

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-27 Thread Owen Pan via cfe-commits
@@ -26179,7 +26179,7 @@ TEST_F(FormatTest, RemoveSemicolon) { TEST_F(FormatTest, BreakAfterAttributes) { FormatStyle Style = getLLVMStyle(); - EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Never); + EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Leave); --

[clang] 9299ace - [clang-format][NFC] Remove extraneous newlines in remaining unit tests

2023-10-27 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-10-27T03:42:16-07:00 New Revision: 9299ace0a20d3ea4d921c033a49364ea6f24263e URL: https://github.com/llvm/llvm-project/commit/9299ace0a20d3ea4d921c033a49364ea6f24263e DIFF: https://github.com/llvm/llvm-project/commit/9299ace0a20d3ea4d921c033a49364ea6f24263e.diff LOG:

[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

2023-10-27 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/70360 ___ 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)

2023-10-27 Thread Owen Pan via cfe-commits
owenca wrote: > @gedare can you fix the merge conflict on this one? We don't want to merge this yet. See [here](https://github.com/llvm/llvm-project/issues/68079#issuecomment-1776826021). https://github.com/llvm/llvm-project/pull/69340 ___ cfe-commit

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

2023-10-27 Thread Owen Pan via cfe-commits
https://github.com/owenca requested changes to this pull request. Please see [here](https://github.com/llvm/llvm-project/issues/68079#issuecomment-1776826021). https://github.com/llvm/llvm-project/pull/69340 ___ cfe-commits mailing list cfe-commits@li

[clang] c41b3b0 - [clang-format] Adjust braced list detection

2021-12-05 Thread Owen Pan via cfe-commits
Author: Tan S. B Date: 2021-12-05T22:39:29-08:00 New Revision: c41b3b0fa0f4f70aad8deaf48bcd42a04385066c URL: https://github.com/llvm/llvm-project/commit/c41b3b0fa0f4f70aad8deaf48bcd42a04385066c DIFF: https://github.com/llvm/llvm-project/commit/c41b3b0fa0f4f70aad8deaf48bcd42a04385066c.diff LOG:

[clang-tools-extra] 015ce15 - [clang-format][NFC] Rewrite prints in python3 compatible way

2022-09-25 Thread Owen Pan via cfe-commits
Author: Danil Sidoruk Date: 2022-09-25T13:27:42-07:00 New Revision: 015ce15ea27bcd88447d84c4b277d775fede29f7 URL: https://github.com/llvm/llvm-project/commit/015ce15ea27bcd88447d84c4b277d775fede29f7 DIFF: https://github.com/llvm/llvm-project/commit/015ce15ea27bcd88447d84c4b277d775fede29f7.diff

[clang] 258d7b8 - [clang-format] Handle constructor invocations after new operator in C# correct

2022-09-25 Thread Owen Pan via cfe-commits
Author: Danil Sidoruk Date: 2022-09-25T21:10:26-07:00 New Revision: 258d7b86eeab4222c783c1a19acd8e18cd7745aa URL: https://github.com/llvm/llvm-project/commit/258d7b86eeab4222c783c1a19acd8e18cd7745aa DIFF: https://github.com/llvm/llvm-project/commit/258d7b86eeab4222c783c1a19acd8e18cd7745aa.diff

[clang] 4cafc37 - [clang-format] Add 'friend' to QualifierOrder

2022-12-22 Thread Owen Pan via cfe-commits
Author: Micah Weston Date: 2022-12-22T02:02:09-08:00 New Revision: 4cafc3727b35151e8f676adab11524bb21140939 URL: https://github.com/llvm/llvm-project/commit/4cafc3727b35151e8f676adab11524bb21140939 DIFF: https://github.com/llvm/llvm-project/commit/4cafc3727b35151e8f676adab11524bb21140939.diff

[clang] 0dc4dfa - [clang-format] Add InsertBraces to operator== in Format.h

2022-12-22 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-12-22T02:28:25-08:00 New Revision: 0dc4dfabd748ba3bc4d968a88104c686c388f177 URL: https://github.com/llvm/llvm-project/commit/0dc4dfabd748ba3bc4d968a88104c686c388f177 DIFF: https://github.com/llvm/llvm-project/commit/0dc4dfabd748ba3bc4d968a88104c686c388f177.diff LOG:

[clang] 46c94e5 - [clang-format] Add an option to format integer literal separators

2022-12-24 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-12-24T15:35:17-08:00 New Revision: 46c94e5067b5f396c24bb950505c79bc819bd4b8 URL: https://github.com/llvm/llvm-project/commit/46c94e5067b5f396c24bb950505c79bc819bd4b8 DIFF: https://github.com/llvm/llvm-project/commit/46c94e5067b5f396c24bb950505c79bc819bd4b8.diff LOG:

[clang] 879bd91 - [clang-format] Disable FixRanges in IntegerLiteralSeparatorTest

2022-12-24 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-12-24T18:55:24-08:00 New Revision: 879bd9146a2c9ea395abd7c1ebd0f76f414a4967 URL: https://github.com/llvm/llvm-project/commit/879bd9146a2c9ea395abd7c1ebd0f76f414a4967 DIFF: https://github.com/llvm/llvm-project/commit/879bd9146a2c9ea395abd7c1ebd0f76f414a4967.diff LOG:

[clang] 89aad1e - Reland [clang-format] Add an option to format integer literal separators

2022-12-31 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-12-31T17:57:33-08:00 New Revision: 89aad1e6a397447f9574bb088f4de1d9044b5812 URL: https://github.com/llvm/llvm-project/commit/89aad1e6a397447f9574bb088f4de1d9044b5812 DIFF: https://github.com/llvm/llvm-project/commit/89aad1e6a397447f9574bb088f4de1d9044b5812.diff LOG:

[clang] b027cdc - [clang-format][NFC] Clean up IntegerLiteralSeparatorFixer::process

2023-01-01 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-01T14:49:12-08:00 New Revision: b027cdc5b99f56fdfe6c6dbb05188675b94a1aa5 URL: https://github.com/llvm/llvm-project/commit/b027cdc5b99f56fdfe6c6dbb05188675b94a1aa5 DIFF: https://github.com/llvm/llvm-project/commit/b027cdc5b99f56fdfe6c6dbb05188675b94a1aa5.diff LOG:

[clang] ed4afd1 - [clang-format][docs] Fix indentation for the Sphinx build

2023-01-01 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-01T15:13:36-08:00 New Revision: ed4afd1bba8347e1d7ea943c242fccabf606489c URL: https://github.com/llvm/llvm-project/commit/ed4afd1bba8347e1d7ea943c242fccabf606489c DIFF: https://github.com/llvm/llvm-project/commit/ed4afd1bba8347e1d7ea943c242fccabf606489c.diff LOG:

[clang] fbc8697 - [clang-format][NFC] Remove a superfluous semicolon after \version

2023-01-02 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-02T18:55:30-08:00 New Revision: fbc86973b58d7fe735596dfbe38884bc9398e52c URL: https://github.com/llvm/llvm-project/commit/fbc86973b58d7fe735596dfbe38884bc9398e52c DIFF: https://github.com/llvm/llvm-project/commit/fbc86973b58d7fe735596dfbe38884bc9398e52c.diff LOG:

[clang] a28f074 - [clang-format] Add an option for breaking after C++11 attributes

2023-01-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-05T04:08:58-08:00 New Revision: a28f0747c2f3728bd8a6f64f7c8ba80b4e0cda9f URL: https://github.com/llvm/llvm-project/commit/a28f0747c2f3728bd8a6f64f7c8ba80b4e0cda9f DIFF: https://github.com/llvm/llvm-project/commit/a28f0747c2f3728bd8a6f64f7c8ba80b4e0cda9f.diff LOG:

[clang] 5751c43 - [clang-format] Improve UnwrappedLineParser::mightFitOnOneLine()

2023-01-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-05T13:23:23-08:00 New Revision: 5751c439be7d00427991e8503e618d0c27a56f89 URL: https://github.com/llvm/llvm-project/commit/5751c439be7d00427991e8503e618d0c27a56f89 DIFF: https://github.com/llvm/llvm-project/commit/5751c439be7d00427991e8503e618d0c27a56f89.diff LOG:

[clang] 2c6ecc9 - [clang-format] Add an option to insert a newline at EOF if missing

2023-01-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-05T15:25:51-08:00 New Revision: 2c6ecc9db624442dcc4c80ab02d15e0833c7f8a3 URL: https://github.com/llvm/llvm-project/commit/2c6ecc9db624442dcc4c80ab02d15e0833c7f8a3 DIFF: https://github.com/llvm/llvm-project/commit/2c6ecc9db624442dcc4c80ab02d15e0833c7f8a3.diff LOG:

[clang] 1b1d8ac - [clang-format][doc] Fix doc format for IntegerLiteralSeparator

2023-01-11 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-11T03:23:34-08:00 New Revision: 1b1d8acdfa1e8fc5bc64ffd982bb689e308d6c20 URL: https://github.com/llvm/llvm-project/commit/1b1d8acdfa1e8fc5bc64ffd982bb689e308d6c20 DIFF: https://github.com/llvm/llvm-project/commit/1b1d8acdfa1e8fc5bc64ffd982bb689e308d6c20.diff LOG:

[clang] 117d792 - [clang-format] Don't skip #else/#elif of #if 0

2022-11-02 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-11-02T13:32:08-07:00 New Revision: 117d792f35e6f84f2f29183408284c7e1cc838e7 URL: https://github.com/llvm/llvm-project/commit/117d792f35e6f84f2f29183408284c7e1cc838e7 DIFF: https://github.com/llvm/llvm-project/commit/117d792f35e6f84f2f29183408284c7e1cc838e7.diff LOG:

[clang] e787708 - [clang-format][NFC] Remove parsePPElIf()

2022-11-04 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-11-04T00:38:40-07:00 New Revision: e787708bcf53e8849481f2d0267f7e8b5dbf6c8d URL: https://github.com/llvm/llvm-project/commit/e787708bcf53e8849481f2d0267f7e8b5dbf6c8d DIFF: https://github.com/llvm/llvm-project/commit/e787708bcf53e8849481f2d0267f7e8b5dbf6c8d.diff LOG:

[clang] 96e2390 - [clang-format] Correctly annotate function names before attributes

2022-11-12 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2022-11-12T00:40:46-08:00 New Revision: 96e23906b5e80dc86b5d2431d30c9afc38ae4d20 URL: https://github.com/llvm/llvm-project/commit/96e23906b5e80dc86b5d2431d30c9afc38ae4d20 DIFF: https://github.com/llvm/llvm-project/commit/96e23906b5e80dc86b5d2431d30c9afc38ae4d20.diff LOG:

[clang] e864ac6 - [clang-format] Treats &/&& as reference when followed by ',' or ')'

2022-11-12 Thread Owen Pan via cfe-commits
Author: Micah Weston Date: 2022-11-12T00:58:58-08:00 New Revision: e864ac694540342d5e59f59c525c5082f2594fb8 URL: https://github.com/llvm/llvm-project/commit/e864ac694540342d5e59f59c525c5082f2594fb8 DIFF: https://github.com/llvm/llvm-project/commit/e864ac694540342d5e59f59c525c5082f2594fb8.diff

[clang] 56313f6 - [clang-format] Put peekNextToken(/*SkipComment=*/true) to good use

2023-01-24 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-01-24T18:40:14-08:00 New Revision: 56313f65cce71366fdc659d1d08e0eeaa5d40b63 URL: https://github.com/llvm/llvm-project/commit/56313f65cce71366fdc659d1d08e0eeaa5d40b63 DIFF: https://github.com/llvm/llvm-project/commit/56313f65cce71366fdc659d1d08e0eeaa5d40b63.diff LOG:

[clang] 25e2d0f - [clang-format] Support clang-format on/off line comments as prefix

2023-02-01 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-02-01T13:07:09-08:00 New Revision: 25e2d0f3c803e4d71f7ef4893b5d023d252b283f URL: https://github.com/llvm/llvm-project/commit/25e2d0f3c803e4d71f7ef4893b5d023d252b283f DIFF: https://github.com/llvm/llvm-project/commit/25e2d0f3c803e4d71f7ef4893b5d023d252b283f.diff LOG:

[clang] 4f37de9 - [clang-format][doc] Fix a typo

2023-02-03 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2023-02-03T00:24:54-08:00 New Revision: 4f37de9c91eb0674c3f218c5b585780bd7072593 URL: https://github.com/llvm/llvm-project/commit/4f37de9c91eb0674c3f218c5b585780bd7072593 DIFF: https://github.com/llvm/llvm-project/commit/4f37de9c91eb0674c3f218c5b585780bd7072593.diff LOG:

cfe-commits@lists.llvm.org

2023-02-05 Thread Owen Pan via cfe-commits
Author: David Turner Date: 2023-02-05T13:33:33-08:00 New Revision: 35f2ac1763adcbd5ee9b49a98de24c0c420c323e URL: https://github.com/llvm/llvm-project/commit/35f2ac1763adcbd5ee9b49a98de24c0c420c323e DIFF: https://github.com/llvm/llvm-project/commit/35f2ac1763adcbd5ee9b49a98de24c0c420c323e.diff

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