Revision tags: llvmorg-17.0.3 |
|
#
b6f29191 |
| 04-Oct-2023 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format][NFC] AlignTokenSequence: Skip loop iteration
When Shift is 0 there does nothing happen in the remainder of the loop,
express that directly.
|
#
7539bcf9 |
| 04-Oct-2023 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format][NFC] AlignTokenSequence: Rename Changes[i] to CurrentC…
…hange
To improve debugging experience.
|
#
b4a076a1 |
| 04-Oct-2023 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format][NFC] AlignTokens: Rename Changes[i] to CurrentChange (#68152)
To improve debugging experience.
|
#
7e856d18 |
| 04-Oct-2023 |
Owen Pan <owenpiano@gmail.com> |
Reland "[clang-format] Annotate ctors/dtors as CtorDtorDeclName instead (#67955)"
Reland 6a621ed8e4cb which failed on Windows but not macOS.
The failures were caused by moving the annotation of the
Reland "[clang-format] Annotate ctors/dtors as CtorDtorDeclName instead (#67955)"
Reland 6a621ed8e4cb which failed on Windows but not macOS.
The failures were caused by moving the annotation of the children from the top to the bottom of TokenAnnotator::annotate(), resulting in invalid lines including incomplete ones being skipped.
show more ...
|
#
d08fcc81 |
| 04-Oct-2023 |
Owen Pan <owenpiano@gmail.com> |
Revert "[clang-format] Annotate ctors/dtors as CtorDtorDeclName instead (#67955)"
This reverts commit 6a621ed8e4cb02bd55fe4a4a0254615576b70a55 as it caused buildbots to fail.
|
#
6a621ed8 |
| 04-Oct-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Annotate ctors/dtors as CtorDtorDeclName instead (#67955)
After annotating constructors/destructors as FunctionDeclarationName in
commit 08630512088, we have seen several issues beca
[clang-format] Annotate ctors/dtors as CtorDtorDeclName instead (#67955)
After annotating constructors/destructors as FunctionDeclarationName in
commit 08630512088, we have seen several issues because ctors/dtors had
been treated differently than functions in aligning, wrapping, and
indenting.
This patch annotates ctors/dtors as CtorDtorDeclName instead and would
effectively revert commit 0468fa07f87f, which is obsolete now.
Fixed #67903.
Fixed #67907.
show more ...
|
#
1f012690 |
| 03-Oct-2023 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Fix alignment in presence of template functions (#68029)
Fixes #68102.
|
Revision tags: llvmorg-17.0.2 |
|
#
0468fa07 |
| 29-Sep-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Don't align ctors and dtors with other functions (#67618)
Fixed #67604.
|
#
d3f8c88a |
| 25-Sep-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Fix a bug in aligning trailing comments (#67221)
Fixes #67116.
|
#
ff7e8540 |
| 25-Sep-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Fix an assertion failure in Whitespace Manager
|
#
d1c643a0 |
| 24-Sep-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Clean up alignTrailingComments() (#67218)
|
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 |
|
#
ddc80637 |
| 29-Jun-2023 |
sstwcw <su3e8a96kzlver@posteo.net> |
[clang-format] Break long string literals in C#, etc.
Now strings that are too long for one line in C#, Java, JavaScript, and Verilog get broken into several lines. C# and JavaScript interpolated s
[clang-format] Break long string literals in C#, etc.
Now strings that are too long for one line in C#, Java, JavaScript, and Verilog get broken into several lines. C# and JavaScript interpolated strings are not broken.
A new subclass BreakableStringLiteralUsingOperators is used to handle the logic for adding plus signs and commas. The updateAfterBroken method was added because now parentheses or braces may be required after the parentheses or commas are added. In order to decide whether the added plus sign should be unindented in the BreakableToken object, the logic for it is taken out into a separate function shouldUnindentNextOperator.
The logic for finding the continuation indentation when the option AlignAfterOpenBracket is set to DontAlign is not implemented yet. So in that case the new line may have the wrong indentation, and the parts may have the wrong length if the string needs to be broken more than once because finding where to break the string depends on where the string starts.
The preambles for the C# and Java unit tests are changed to the newer style in order to allow the 3-argument verifyFormat macro. Some cases are changed from verifyFormat to verifyImcompleteFormat because those use incomplete code and the new verifyFormat function checks that the code is complete.
The line in the doc was changed to being indented by 4 spaces, that is, the default continuation indentation. It has always been the case. It was probably a mistake that the doc showed 2 spaces previously.
This commit was fist committed as 16ccba51072b. The tests caused assertion failures. Then it was reverted in 547bce36132a.
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D154093
show more ...
|
#
58c67e72 |
| 31-Aug-2023 |
Galen Elias <galenelias@gmail.com> |
[clang-format] Fix AlignArrayOfStructures + Cpp11BracedListStyle=false
Currently AlignArrayOfStructures=Left is hard coding setting Spaces to 0 for the token following the initial opening brace, but
[clang-format] Fix AlignArrayOfStructures + Cpp11BracedListStyle=false
Currently AlignArrayOfStructures=Left is hard coding setting Spaces to 0 for the token following the initial opening brace, but not touching Spaces for the subsequent lines, which leads to the array being misaligned. Additionally, it's not adding a space before the trailing } which is generally done when Cpp11BracedListStyle=false.
I'm not exactly sure why this function needs to override the Spaces as it seems to generally already be set to either 0 or 1 according to the other formatting settings, but I'm going with an explicit fix where I just force the padding to 1 when Cpp11BracedListStyle=false.
AlignArrayOfStructures=Right doesn't have any alignment problems, but isn't adding the expected padding around the braces either, so I'm giving that the same treatment.
Fixes #57611.
Differential Revision: https://reviews.llvm.org/D158795
show more ...
|
#
ca0aa533 |
| 26-Aug-2023 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Handle Template Arguments with AlignConsecutiveXX
This fixes https://github.com/llvm/llvm-project/issues/64928.
Differential-Revision: https://reviews.llvm.org/D158945
|
#
91c4db00 |
| 24-Aug-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Replace !is() with isNot()
Differential Revision: https://reviews.llvm.org/D158571
|
#
547bce36 |
| 24-Aug-2023 |
David Spickett <david.spickett@linaro.org> |
Revert "[clang-format] Break long string literals in C#, etc."
This reverts commit 16ccba51072bbc5ff4c66f91f939163dc91e5d96.
This is failing across Linaro's bots e.g.: https://lab.llvm.org/buildbot
Revert "[clang-format] Break long string literals in C#, etc."
This reverts commit 16ccba51072bbc5ff4c66f91f939163dc91e5d96.
This is failing across Linaro's bots e.g.: https://lab.llvm.org/buildbot/#/builders/188/builds/34393
show more ...
|
#
16ccba51 |
| 29-Jun-2023 |
sstwcw <su3e8a96kzlver@posteo.net> |
[clang-format] Break long string literals in C#, etc.
Now strings that are too long for one line in C#, Java, JavaScript, and Verilog get broken into several lines. C# and JavaScript interpolated s
[clang-format] Break long string literals in C#, etc.
Now strings that are too long for one line in C#, Java, JavaScript, and Verilog get broken into several lines. C# and JavaScript interpolated strings are not broken.
A new subclass BreakableStringLiteralUsingOperators is used to handle the logic for adding plus signs and commas. The updateAfterBroken method was added because now parentheses or braces may be required after the parentheses or commas are added. In order to decide whether the added plus sign should be unindented in the BreakableToken object, the logic for it is taken out into a separate function shouldUnindentNextOperator.
The logic for finding the continuation indentation when the option AlignAfterOpenBracket is set to DontAlign is not implemented yet. So in that case the new line may have the wrong indentation, and the parts may have the wrong length if the string needs to be broken more than once because finding where to break the string depends on where the string starts.
The preambles for the C# and Java unit tests are changed to the newer style in order to allow the 3-argument verifyFormat macro. Some cases are changed from verifyFormat to verifyImcompleteFormat because those use incomplete code and the new verifyFormat function checks that the code is complete.
The line in the doc was changed to being indented by 4 spaces, that is, the default continuation indentation. It has always been the case. It was probably a mistake that the doc showed 2 spaces previously.
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D154093
show more ...
|
Revision tags: 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
|
#
74720d1b |
| 25-Jul-2023 |
Galen Elias <galenelias@gmail.com> |
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabel
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the case statement's colon. This also adds a AlignCaseColons option to allow aligning the case label colon itself rather than the token after it.
Fixes #55475.
Differential Revision: https://reviews.llvm.org/D151761
show more ...
|
#
87ad34ff |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
Revert "[clang-format] Add AlignConsecutiveShortCaseStatements"
This reverts commit 4ba00844174db562d2bd8b15dab6aac605eddf57.
|
#
ac6e5514 |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
Revert "Revert "[clang-format] Add AlignConsecutiveShortCaseStatements""
This reverts commit 4f093b31669a4f8e417259583141159586a05b28.
|
#
4f093b31 |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
Revert "[clang-format] Add AlignConsecutiveShortCaseStatements"
This reverts commit 4ba00844174db562d2bd8b15dab6aac605eddf57 due to missing authorship.
|
#
4ba00844 |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabel
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the case statement's colon. This also adds a AlignCaseColons option to allow aligning the case label colon itself rather than the token after it.
Fixes #55475.
Differential Revision: https://reviews.llvm.org/D151761
show more ...
|
#
a84e0b4b |
| 06-Jul-2023 |
Gedare Bloom <gedare@rtems.org> |
[clang-format] Fix align consecutive declarations over function pointers
Fixes a bug that prevents alignment from proceeding through a function pointer in a list of declarations.
Fixes #63451.
Dif
[clang-format] Fix align consecutive declarations over function pointers
Fixes a bug that prevents alignment from proceeding through a function pointer in a list of declarations.
Fixes #63451.
Differential Revision: https://reviews.llvm.org/D153585
show more ...
|
#
6b8a9ff7 |
| 06-Jul-2023 |
Gedare Bloom <gedare@rtems.org> |
[clang-format] Fix RAS reference alignment when PAS is left or middle
Fixes a bug with the handling of right aligned references with left/middle alignment pointers.
Fixes #63452.
Differential Revi
[clang-format] Fix RAS reference alignment when PAS is left or middle
Fixes a bug with the handling of right aligned references with left/middle alignment pointers.
Fixes #63452.
Differential Revision: https://reviews.llvm.org/D153579
show more ...
|