History log of /llvm-project/clang/unittests/Format/FormatTestComments.cpp (Results 1 – 25 of 74)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2
# 0fba8381 12-Oct-2024 Iuri Chaer <ichaer@splunk.com>

[clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (#96804)

* Convert `ReflowComments` from boolean into a new `enum` wh

[clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (#96804)

* Convert `ReflowComments` from boolean into a new `enum` which can take
on the value `RCS_Never`, `RCS_IndentOnly`, or `RCS_Always`. The first
one is equivalent to the old `false`, the third one is `true`, and the
middle one means that multiline comments should only have their
indentation corrected, which is what Doxygen users will want.
* Preserve backward compatibility while parsing `ReflowComments`.

show more ...


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4
# 7c3237d7 23-Aug-2024 Tom <pottagetom@gmail.com>

[clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (#101882)

Related issues that have requested this feature:
#51833
#23796
#53190 Partially solves - this issue requests is

[clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (#101882)

Related issues that have requested this feature:
#51833
#23796
#53190 Partially solves - this issue requests is for both arguments and
parameters

show more ...


Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# dcf6b7a8 12-Jul-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in TCAS_Leave using tabs for indentation (#98427)

Fixes #92530.


Revision tags: llvmorg-18.1.8
# cddb9ce0 15-Jun-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Don't over-indent comment below unbraced body (#95354)

Fixes #45002.


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# d61edecb 12-Apr-2024 Owen Pan <owenpiano@gmail.com>

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

Commit d06b92391513 caused a regression that breaks after a block
comment adjacent to a function paramter that follows.

Fixes #86

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

Commit d06b92391513 caused a regression that breaks after a block
comment adjacent to a function paramter that follows.

Fixes #86573.

show more ...


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2
# 1b03cbc9 07-Feb-2024 Fernando Tagawa <tagawafernando@gmail.com>

[clang-format] Handle doxygen commands starting with \ (#80381)

Fixes llvm/llvm-project#63241

Doxygen commands can start with `@` or `\`.


Revision tags: llvmorg-18.1.0-rc1, llvmorg-19-init
# e1a4b003 07-Dec-2023 Owen Pan <owenpiano@gmail.com>

[clang-format] Handle merging functions containing only a block comment (#74651)

Fixed #41854.


Revision tags: llvmorg-17.0.6
# 5860d248 19-Nov-2023 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in aligning comments above PPDirective (#72791)

Fixed #72785.


Revision tags: llvmorg-17.0.5, llvmorg-17.0.4
# 88934a82 27-Oct-2023 Owen Pan <owenpiano@gmail.com>

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


# 5efa84cf 25-Oct-2023 Björn Schäpers <bjoern@hazardy.de>

[clang-format] Don't align comments over scopes

We now stop aligning trailing comments on all closing braces, for
classes etc. we even check for the semicolon between the comment and the
brace.

[clang-format] Don't align comments over scopes

We now stop aligning trailing comments on all closing braces, for
classes etc. we even check for the semicolon between the comment and the
brace.

Fixes #67906.

show more ...


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2
# d3f8c88a 25-Sep-2023 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in aligning trailing comments (#67221)

Fixes #67116.


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6
# 77a38f43 18-Nov-2022 Björn Schäpers <bjoern@hazardy.de>

[clang-format] Supress aligning of trailing namespace comments

Fixes https://github.com/llvm/llvm-project/issues/57504.

Differential Revision: https://reviews.llvm.org/D138263


# 2f6b2daf 23-Jul-2023 Owen Pan <owenpiano@gmail.com>

[clang-format] Insert namespace comments with leading spaces

Insert missing namespace comments with SpacesBeforeTrailingComments
leading spaces.

Fixes #64051.

Differential Revision: https://review

[clang-format] Insert namespace comments with leading spaces

Insert missing namespace comments with SpacesBeforeTrailingComments
leading spaces.

Fixes #64051.

Differential Revision: https://reviews.llvm.org/D156065

show more ...


# 1116ed2b 21-Nov-2022 Björn Schäpers <bjoern@hazardy.de>

[clang-format] Correctly count a tab's width in a comment

It worked only correct for a tab as the first char.

Fixes https://github.com/llvm/llvm-project/issues/56769

Differential Revision: https:/

[clang-format] Correctly count a tab's width in a comment

It worked only correct for a tab as the first char.

Fixes https://github.com/llvm/llvm-project/issues/56769

Differential Revision: https://reviews.llvm.org/D138402

show more ...


# 8411bdb0 17-Jun-2023 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Remove redundant getLLVMStyle() in unit tests


# 20b4df1e 16-Jun-2023 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Clean up unit tests

This patch adds a verifyNoChange macro to verify code that won't
change after being formatted. (The code will not be messed up before
being formatted.) It the

[clang-format][NFC] Clean up unit tests

This patch adds a verifyNoChange macro to verify code that won't
change after being formatted. (The code will not be messed up before
being formatted.) It then replaces EXPECT_EQ with verifyFormat
wherever applicable so that the code will be messed up before being
formatted. When the replacement fails the unit test, verifyFormat is
replaced with verifyNoChange.

Differential Revision: https://reviews.llvm.org/D153109

show more ...


# e9acf001 09-May-2023 Owen Pan <owenpiano@gmail.com>

[clang-format] Put a "trailing" space back in a unit test

Put an intentional "trailing" space back in
FormatTestComments.SplitCommentIntroducers. It was removed in
a4c87f8ccacc by mistake.


# a4c87f8c 06-May-2023 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix consecutive alignments in #else blocks

Since 3.8 or earlier, clang-format has been lumping all #else, #elif,
etc blocks together when doing whitespace replacements and causing
con

[clang-format] Fix consecutive alignments in #else blocks

Since 3.8 or earlier, clang-format has been lumping all #else, #elif,
etc blocks together when doing whitespace replacements and causing
consecutive alignments across #else blocks.

Commit c077975 partially addressed the problem but also triggered
"regressions".

This patch fixes the root cause of the problem and "reverts" c077975
(except for the unit tests).

Fixes #36070.
Fixes #55265.
Fixes #60721.
Fixes #61498.

Differential Revision: https://reviews.llvm.org/D150057

show more ...


# 293e4da3 13-Apr-2023 Owen Pan <owenpiano@gmail.com>

[clang-format] Correctly indent comment above finalized PPDirective

Fixes #62107.

Differential Revision: https://reviews.llvm.org/D148200


# f8d10d5a 01-Mar-2023 Manuel Klimek <klimek@google.com>

[clang-format][NFC] Refactor formatting unit tests.

Pull out common base class for formatting unit tests, removing duplicate
code that accumulated over the years.

Pull out macro expansion test into

[clang-format][NFC] Refactor formatting unit tests.

Pull out common base class for formatting unit tests, removing duplicate
code that accumulated over the years.

Pull out macro expansion test into its own test file.

show more ...


# ad83bead 01-Dec-2022 Maíra Canal <mairacanal@riseup.net>

[clang-format] Don't move comments if AlignTrailingComments: Leave

For comments that start after a new line, currently, the comments are
being indented. This happens because the OriginalWhitespaceRa

[clang-format] Don't move comments if AlignTrailingComments: Leave

For comments that start after a new line, currently, the comments are
being indented. This happens because the OriginalWhitespaceRange
considers newlines on the range. Therefore, when AlignTrailingComments:
Kind: Leave, deduct the number of newlines before the token to calculate
the number of spaces for trailing comments.

Fixes #59203.

Differential Revision: https://reviews.llvm.org/D139029

show more ...


# 5ba5f7c4 20-Nov-2022 Björn Schäpers <bjoern@hazardy.de>

[clang-format][NFC] Removed unused include


Revision tags: llvmorg-15.0.5, llvmorg-15.0.4
# 3edc1210 30-Oct-2022 Yusuke Kadowaki <yusuke.kadowaki.1231@gmail.com>

[clang-format] Adds a formatter for aligning trailing comments over empty lines

This patch addresses https://github.com/llvm/llvm-project/issues/19756

Reviewed By: MyDeveloperDay, HazardyKnusperkek

[clang-format] Adds a formatter for aligning trailing comments over empty lines

This patch addresses https://github.com/llvm/llvm-project/issues/19756

Reviewed By: MyDeveloperDay, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D132131

show more ...


Revision tags: llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# 36d13d3f 01-Mar-2022 Marek Kurdej <marek.kurdej+llvm.org@gmail.com>

[clang-format] Add space to comments starting with '#'.

Fixes https://github.com/llvm/llvm-project/issues/35116.

Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan

Differential Revision: htt

[clang-format] Add space to comments starting with '#'.

Fixes https://github.com/llvm/llvm-project/issues/35116.

Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan

Differential Revision: https://reviews.llvm.org/D121451

show more ...


# d9567bab 20-Feb-2022 Luis Penagos <luis@penagos.co>

Fix extraneous whitespace addition in line comments on clang-format directives

Fixes https://github.com/llvm/llvm-project/issues/53844.
I believe this regression was caused by not accounting for cla

Fix extraneous whitespace addition in line comments on clang-format directives

Fixes https://github.com/llvm/llvm-project/issues/53844.
I believe this regression was caused by not accounting for clang-format directives in https://reviews.llvm.org/D92257.

Reviewed By: HazardyKnusperkeks, curdeius

Differential Revision: https://reviews.llvm.org/D120188

show more ...


123