HazardyKnusperkeks 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()`.
https:
https://github.com/HazardyKnusperkeks edited
https://github.com/llvm/llvm-project/pull/78032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks commented:
You can just mark conversations as resolved. You still can comment on them. But
if it's clear no need to keep it open.
https://github.com/llvm/llvm-project/pull/78032
___
cfe-commits mailing list
cfe-co
@@ -274,13 +274,13 @@ void FormatTokenLexer::tryMergePreviousTokens() {
return;
}
}
- if (Style.isTableGen()) {
-if (tryMergeTokens({tok::l_square, tok::l_brace},
- TT_TableGenMultiLineString)) {
- // Multi line string starts with [{
HazardyKnusperkeks wrote:
I think this is kind of too specific. Whoever uses `not` will most likely not
combine it with `!`. Also I agree with
https://github.com/llvm/llvm-project/issues/78166#issuecomment-1892311219 that
`WhitespaceSensitiveMacros` should be used.
https://github.com/llvm/llv
https://github.com/HazardyKnusperkeks approved this pull request.
Thanks!
https://github.com/llvm/llvm-project/pull/78256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks closed
https://github.com/llvm/llvm-project/pull/78256
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/78032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() {
FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth,
Encoding);
}
+void FormatTokenLexer::handleTableGenNumericLikeIdentifier() {
+ FormatToken *Tok = Tokens.back();
+ // TableGen
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() {
FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth,
Encoding);
}
+void FormatTokenLexer::handleTableGenNumericLikeIdentifier() {
+ FormatToken *Tok = Tokens.back();
+ // TableGen
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() {
FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth,
Encoding);
}
+void FormatTokenLexer::handleTableGenNumericLikeIdentifier() {
+ FormatToken *Tok = Tokens.back();
+ // TableGen
@@ -804,6 +806,46 @@ void FormatTokenLexer::handleTableGenMultilineString() {
FirstLineText, MultiLineString->OriginalColumn, Style.TabWidth,
Encoding);
}
+void FormatTokenLexer::handleTableGenNumericLikeIdentifier() {
+ FormatToken *Tok = Tokens.back();
+ // TableGen
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/78682
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request.
I think splitting the two features would be better.
Also please add a note to the changelog.
https://github.com/llvm/llvm-project/pull/77918
___
cfe-commits mailing list
cfe
https://github.com/HazardyKnusperkeks edited
https://github.com/llvm/llvm-project/pull/77918
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2459,6 +2459,52 @@ struct FormatStyle {
/// \version 12
EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier;
+ /// \brief Number of lines after includes.
+ /// If set, determines the number of lines to insert after includes.
+ /// Limited by MaxEmptyLin
@@ -2459,6 +2459,52 @@ struct FormatStyle {
/// \version 12
EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier;
+ /// \brief Number of lines after includes.
+ /// If set, determines the number of lines to insert after includes.
+ /// Limited by MaxEmptyLin
@@ -0,0 +1,70 @@
+//===--- TopLevelCommentSeparator.cpp ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -1035,6 +1039,8 @@ template <> struct MappingTraits {
IO.mapOptional("MaxEmptyLinesToKeep", Style.MaxEmptyLinesToKeep);
IO.mapOptional("NamespaceIndentation", Style.NamespaceIndentation);
IO.mapOptional("NamespaceMacros", Style.NamespaceMacros);
+IO.mapOption
@@ -2459,6 +2459,52 @@ struct FormatStyle {
/// \version 12
EmptyLineBeforeAccessModifierStyle EmptyLineBeforeAccessModifier;
+ /// \brief Number of lines after includes.
+ /// If set, determines the number of lines to insert after includes.
+ /// Limited by MaxEmptyLin
@@ -26846,6 +26846,26 @@ TEST_F(FormatTest, BreakAdjacentStringLiterals) {
Style.BreakAdjacentStringLiterals = false;
verifyFormat(Code, Style);
}
+
+TEST_F(FormatTest, EmptyLinesAfterInclude) {
+ auto Style = getLLVMStyle();
+ Style.EmptyLinesAfterIncludes = 2;
+ Style.
@@ -0,0 +1,70 @@
+//===--- TopLevelCommentSeparator.cpp ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -0,0 +1,112 @@
+//===- unittest/Format/TopLevelCommentSeparatorTest.cpp - Formatting unit tests
+//-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Id
@@ -4827,6 +4873,8 @@ struct FormatStyle {
DerivePointerAlignment == R.DerivePointerAlignment &&
DisableFormat == R.DisableFormat &&
EmptyLineAfterAccessModifier == R.EmptyLineAfterAccessModifier &&
+ EmptyLinesAfterIncludes == R.Empty
@@ -26846,6 +26846,26 @@ TEST_F(FormatTest, BreakAdjacentStringLiterals) {
Style.BreakAdjacentStringLiterals = false;
verifyFormat(Code, Style);
}
+
+TEST_F(FormatTest, EmptyLinesAfterInclude) {
+ auto Style = getLLVMStyle();
+ Style.EmptyLinesAfterIncludes = 2;
+ Style.
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/78571
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
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
https://github.com/HazardyKnusperkeks requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/78752
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3392,6 +3392,24 @@ the configuration (without a prefix: ``Auto``).
Priority:1
SortPriority:0
+.. _MainIncludeChar:
HazardyKnusperkeks wrote:
Did you add this by hand? I'm wondering why it has a different order than in
the head
https://github.com/HazardyKnusperkeks edited
https://github.com/llvm/llvm-project/pull/78752
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -151,6 +151,21 @@ struct IncludeStyle {
/// before any other include.
/// \version 10
std::string IncludeIsMainSourceRegex;
+
+ /// Character to consider in the include directives for the main header.
+ enum MainIncludeCharDiscriminator {
+/// Main include uses q
@@ -151,6 +151,21 @@ struct IncludeStyle {
/// before any other include.
/// \version 10
std::string IncludeIsMainSourceRegex;
+
+ /// Character to consider in the include directives for the main header.
+ enum MainIncludeCharDiscriminator {
HazardyKnus
@@ -0,0 +1,27 @@
+// Test the combination of regrouped include directives, via regexes and
HazardyKnusperkeks wrote:
Our tests reside in `clang/unittests/Format/SortIncludesTest.cpp`.
https://github.com/llvm/llvm-project/pull/78752
__
@@ -151,6 +151,21 @@ struct IncludeStyle {
/// before any other include.
/// \version 10
std::string IncludeIsMainSourceRegex;
+
+ /// Character to consider in the include directives for the main header.
HazardyKnusperkeks wrote:
It should also be added
@@ -3132,20 +3133,24 @@ static void sortCppIncludes(const FormatStyle &Style,
}
result += Includes[Index].Text;
if (Cursor && CursorIndex == Index)
- *Cursor = IncludesBeginOffset + result.size() - CursorToEOLOffset;
+ NewCursor = IncludesBeginOffset + res
@@ -3392,6 +3392,24 @@ the configuration (without a prefix: ``Auto``).
Priority:1
SortPriority:0
+.. _MainIncludeChar:
HazardyKnusperkeks wrote:
There's a script: `clang/doc/tools/dump_format_style.py`.
https://github.com/llvm/llv
@@ -0,0 +1,27 @@
+// Test the combination of regrouped include directives, via regexes and
HazardyKnusperkeks wrote:
I've never run anything but the unit tests. I'd remove these, but I have no
strong opinion on that matter.
https://github.com/llvm/llvm-project/
HazardyKnusperkeks wrote:
> > I think splitting the two features would be better.
>
> I'm going to close this MR and create two new ones.
>
> > Also please add a note to the changelog.
>
> Where can I find the changelog?
`clang/docs/ReleaseNotes.rst`
https://github.com/llvm/llvm-project/pull
HazardyKnusperkeks wrote:
> Oh, sorry @HazardyKnusperkeks I missed this in your previous comment.
>
> I've updated the PR.
>
> As a side note, I tried adding these two tests but they fail, meaning the
> cursor is still incorrectly computed with CRLF when replacing lines.
>
> This is due to ad
@@ -2743,6 +2760,14 @@ FormatToken
*UnwrappedLineParser::parseIfThenElse(IfStmtKind *IfKind,
}
}
+ // TableGen's if statement has the form of `if then { ... }`.
+ if (Style.isTableGen()) {
+while (!eof() && !(FormatTok->is(Keywords.kw_then))) {
H
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
HazardyKnusperkeks wrote:
I'm in favor. Just for the correctness.
https://github.com/llvm/llvm-project/pull/78847
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
HazardyKnusperkeks wrote:
Never knew that, and I'm sad I do now...
But based on the documentation one could just check the previous token to be
one of `={,-+(`.
https://github.com/llvm/llvm-project/pull/78852
___
cfe-commits mailing list
cfe-commits@l
https://github.com/HazardyKnusperkeks approved this pull request.
Sorry, seems I've missed this change.
https://github.com/llvm/llvm-project/pull/77868
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
HazardyKnusperkeks wrote:
> #61233
>
> The ambiguities this syntax extension can bring are pretty much impossible or
> at least very hard to handle correctly with how we're currently parsing
> things, but I'll try to avoid breaking things which weren't already broken.
But that is misformatted
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/78011
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HazardyKnusperkeks wrote:
Just ping me in a few days, if there is no other reaction and we merge it.
https://github.com/llvm/llvm-project/pull/78011
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
https://github.com/HazardyKnusperkeks approved this pull request.
I'm actually fascinated how small the diff is, the description led me to
thinking that we'd have a +/-200 lines change.
https://github.com/llvm/llvm-project/pull/78846
___
cfe-commits m
@@ -1071,6 +1071,16 @@ TEST_F(TokenAnnotatorTest,
UnderstandsRequiresClausesAndConcepts) {
"concept C = (!Foo) && Bar;");
ASSERT_EQ(Tokens.size(), 19u) << Tokens;
EXPECT_TOKEN(Tokens[15], tok::ampamp, TT_BinaryOperator);
+
+ Tokens = annotate("void f()
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/78752
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks 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
https://github.com/HazardyKnusperkeks approved this pull request.
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
@@ -3220,6 +3220,25 @@ the configuration (without a prefix: ``Auto``).
+.. _EmptyLinesAfterIncludes:
+
+**EmptyLinesAfterIncludes** (``Unsigned``) :versionbadge:`clang-format 18`
:ref:`¶ `
HazardyKnusperkeks wrote:
Where do I have to sign up for that knowl
@@ -4831,6 +4848,7 @@ struct FormatStyle {
DerivePointerAlignment == R.DerivePointerAlignment &&
DisableFormat == R.DisableFormat &&
EmptyLineAfterAccessModifier == R.EmptyLineAfterAccessModifier &&
+ EmptyLinesAfterIncludes == R.Empty
@@ -0,0 +1,159 @@
+//===--- IncludesSeparator.cpp ---*- C++ -*-===//
HazardyKnusperkeks wrote:
Does this have to be done in a separate pass? Couldn't it be done in the normal
formatting?
https://github.com/llvm/llvm-project/pull/78957
__
@@ -547,18 +547,20 @@ static void PrintVersion(raw_ostream &OS) {
// Dump the configuration.
static int dumpConfig(bool IsSTDIN) {
std::unique_ptr Code;
- // We can't read the code to detect the language if there's no file name.
- if (!IsSTDIN) {
-// Read in the code in
@@ -0,0 +1,5 @@
+// RUN: clang-format -dump-config - < %s | FileCheck %s
HazardyKnusperkeks wrote:
I don't think you need this, right? The unit tests does the same, or not?
https://github.com/llvm/llvm-project/pull/79051
_
https://github.com/HazardyKnusperkeks approved this pull request.
https://github.com/llvm/llvm-project/pull/69340
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3497,6 +3497,15 @@ void
TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const {
Tok->setType(TT_TrailingReturnArrow);
break;
}
+if (Tok->isNot(TT_TrailingAnnotation))
HazardyKnusperkeks wrote:
Unders
@@ -3191,20 +3191,146 @@ 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"
@@ -1118,16 +1121,35 @@ 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);
https://github.com/HazardyKnusperkeks created
https://github.com/llvm/llvm-project/pull/69707
So we can differentiate on the while keyword between a do-while-loop and a
normal while-loop.
From be24095877e6ddd25e0884ad8aaf3eca4846f38d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/68743
From be24095877e6ddd25e0884ad8aaf3eca4846f38d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Fri, 20 Oct 2023 13:00:39 +0200
Subject: [PATCH 1/2] [clang-format] Annotate do
HazardyKnusperkeks wrote:
Some pathological test cases added and handling do-while (relying on #69707).
Only a reply from @mydeveloperday open regarding the change of the existing
test with function braces.
https://github.com/llvm/llvm-project/pull/68743
@@ -0,0 +1 @@
+py -3 git-clang-format %*
HazardyKnusperkeks wrote:
What is `py`? I have no program called `py` on my machine (Windows with msys2),
so you would possibly break that? Why not write `python` or `python3`?
https://github.com/llvm/llvm-project/pull/6
HazardyKnusperkeks wrote:
I have no real opinion on this matter, as I don't use that program/script. But
when it helps the windows users, why not? I also see no harm.
https://github.com/llvm/llvm-project/pull/69228
___
cfe-commits mailing list
cfe-com
https://github.com/HazardyKnusperkeks closed
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
https://github.com/HazardyKnusperkeks approved this pull request.
What is your goal with that style?
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
HazardyKnusperkeks wrote:
> > What is your goal with that style?
>
> It was actually your [idea](https://reviews.llvm.org/D153208#4431239). 😉
I know, but I thought the thought was dropped. :)
So the intent is to use it on our `.clang-format` files?
https://github.com/llvm/llvm-project/pull/69
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/68743
From 8df1b77e223cd5ab5d759ae2d57f4c79306f9149 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Tue, 10 Oct 2023 22:50:43 +0200
Subject: [PATCH] [clang-format] Don't align com
https://github.com/HazardyKnusperkeks edited
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
@@ -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) &&
HazardyKnusperkeks wrote:
https://github.com/HazardyKnusperkeks approved this pull request.
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
@@ -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) &&
HazardyKnusperkeks wrote:
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/68743
From 2efda4c7d5e99b3506a874d514adcb16fe46adce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Tue, 10 Oct 2023 22:50:43 +0200
Subject: [PATCH] [clang-format] Don't align com
@@ -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);
https://github.com/HazardyKnusperkeks approved this pull request.
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
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/68743
From 465003388953a52b70702d45cef7c4031581310d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Tue, 10 Oct 2023 22:50:43 +0200
Subject: [PATCH] [clang-format] Don't align com
@@ -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"
@@ -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"
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/68743
From 3e76e5a0724af4d6f24175796856c919f30547a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Tue, 10 Oct 2023 22:50:43 +0200
Subject: [PATCH] [clang-format] Don't align com
HazardyKnusperkeks wrote:
What Owen says. And given that the modified lines were removed, maybe the
issue(s) are also gone?
To the review unrelated, why didn't it get the
@llvm/pr-subscribers-clang-format thing?
https://github.com/llvm/llvm-project/pull/69859
_
@@ -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"
@@ -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"
+"
https://github.com/HazardyKnusperkeks closed
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
HazardyKnusperkeks wrote:
> yes, issue with breaking after << is gone. I want to get your point about
> functionality clang-format and implementing new option such as
> "BreakAfterStreamOperator". As i can see, @HazardyKnusperkeks you agree with
> "owenca" point?
>
> May be i can do something
https://github.com/HazardyKnusperkeks edited
https://github.com/llvm/llvm-project/pull/70338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/70338
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -24153,6 +24153,23 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) {
verifyNoChange("FOO(String-ized&Messy+But: :Still=Intentional);", Style);
}
+TEST_F(FormatTest, IgnorePPDefinitions) {
HazardyKnusperkeks wrote:
Add some tests:
* With formatted code a
@@ -4648,6 +4648,10 @@ struct FormatStyle {
/// \version 11
std::vector WhitespaceSensitiveMacros;
+ /// Ignore formatting in preprocessor definitions.
+ /// \version 18
+ bool IgnorePPDefinitions;
HazardyKnusperkeks wrote:
Please sort alphabetically.
@@ -1354,7 +1354,9 @@ unsigned UnwrappedLineFormatter::format(
bool FixIndentation = (FixBadIndentation || ContinueFormatting) &&
Indent != TheLine.First->OriginalColumn;
-bool ShouldFormat = TheLine.Affected || FixIndentation;
+bool Shoul
Author: Björn Schäpers
Date: 2020-12-13T14:16:54+01:00
New Revision: 36306403d492d4a4b54c72c6c4c511021584243b
URL:
https://github.com/llvm/llvm-project/commit/36306403d492d4a4b54c72c6c4c511021584243b
DIFF:
https://github.com/llvm/llvm-project/commit/36306403d492d4a4b54c72c6c4c511021584243b.diff
Author: Björn Schäpers
Date: 2020-12-18T19:08:03+01:00
New Revision: 5e5ef5359742c3feb6f41058a356a28c7ab3ea6d
URL:
https://github.com/llvm/llvm-project/commit/5e5ef5359742c3feb6f41058a356a28c7ab3ea6d
DIFF:
https://github.com/llvm/llvm-project/commit/5e5ef5359742c3feb6f41058a356a28c7ab3ea6d.diff
Author: Björn Schäpers
Date: 2020-12-23T22:07:13+01:00
New Revision: 374f1d81febf8143e8e633296a42c2311699c5b3
URL:
https://github.com/llvm/llvm-project/commit/374f1d81febf8143e8e633296a42c2311699c5b3
DIFF:
https://github.com/llvm/llvm-project/commit/374f1d81febf8143e8e633296a42c2311699c5b3.diff
Author: Björn Schäpers
Date: 2020-12-23T22:07:14+01:00
New Revision: 47877c9079c27f19a954b660201ea47717c82fec
URL:
https://github.com/llvm/llvm-project/commit/47877c9079c27f19a954b660201ea47717c82fec
DIFF:
https://github.com/llvm/llvm-project/commit/47877c9079c27f19a954b660201ea47717c82fec.diff
Author: Björn Schäpers
Date: 2021-05-26T07:59:08+02:00
New Revision: 9ef66ed43758a575e1f53a09f07ecb7e3025aafa
URL:
https://github.com/llvm/llvm-project/commit/9ef66ed43758a575e1f53a09f07ecb7e3025aafa
DIFF:
https://github.com/llvm/llvm-project/commit/9ef66ed43758a575e1f53a09f07ecb7e3025aafa.diff
Author: Max Sagebaum
Date: 2021-05-27T13:12:55+02:00
New Revision: 7faffdeb48d3d81ba8fc1353f1a9a563a25adf6d
URL:
https://github.com/llvm/llvm-project/commit/7faffdeb48d3d81ba8fc1353f1a9a563a25adf6d
DIFF:
https://github.com/llvm/llvm-project/commit/7faffdeb48d3d81ba8fc1353f1a9a563a25adf6d.diff
Author: Björn Schäpers
Date: 2021-01-25T21:02:40+01:00
New Revision: 6cb288797122ad931aba91e05030c24984e1031c
URL:
https://github.com/llvm/llvm-project/commit/6cb288797122ad931aba91e05030c24984e1031c
DIFF:
https://github.com/llvm/llvm-project/commit/6cb288797122ad931aba91e05030c24984e1031c.diff
Author: Björn Schäpers
Date: 2021-01-25T21:02:40+01:00
New Revision: 7c8b9c102f38a4d29ac56ef7bd1da003f03900d0
URL:
https://github.com/llvm/llvm-project/commit/7c8b9c102f38a4d29ac56ef7bd1da003f03900d0
DIFF:
https://github.com/llvm/llvm-project/commit/7c8b9c102f38a4d29ac56ef7bd1da003f03900d0.diff
301 - 400 of 884 matches
Mail list logo