|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, 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, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, 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, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, 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, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, 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 <[email protected]> |
[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 <[email protected]> |
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 ...
|
| #
fdee5120 |
| 16-Feb-2022 |
Marek Kurdej <[email protected]> |
[clang-format] Add test for SpacesInLineCommentPrefix. NFC.
Fixes https://github.com/llvm/llvm-project/issues/52649. This was already fixed in commit https://github.com/llvm/llvm-project/commit/e967
[clang-format] Add test for SpacesInLineCommentPrefix. NFC.
Fixes https://github.com/llvm/llvm-project/issues/52649. This was already fixed in commit https://github.com/llvm/llvm-project/commit/e967d97a35a93c883528a9672159edff05f5addb.
show more ...
|
| #
e967d97a |
| 13-Feb-2022 |
Marek Kurdej <[email protected]> |
[clang-format] Fix SpacesInLineCommentPrefix deleting tokens.
Fixes https://github.com/llvm/llvm-project/issues/53799.
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://revie
[clang-format] Fix SpacesInLineCommentPrefix deleting tokens.
Fixes https://github.com/llvm/llvm-project/issues/53799.
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D119680
show more ...
|
| #
09559bc5 |
| 13-Feb-2022 |
Marek Kurdej <[email protected]> |
Avoid a vulgarism. NFC.
|
|
Revision tags: llvmorg-14.0.0-rc1 |
|
| #
88e4e6be |
| 03-Feb-2022 |
ksyx <[email protected]> |
[clang-format] Use wider comment prefix space rule
This commit changes the condition of requiring comment to start with alphanumeric characters to make no change only for a certain set of characters
[clang-format] Use wider comment prefix space rule
This commit changes the condition of requiring comment to start with alphanumeric characters to make no change only for a certain set of characters, currently horizontal whitespace and punctuation characters, to support wider set of leading characters unrelated to documentation generation directives.
Reviewed By: HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D118869
show more ...
|
|
Revision tags: llvmorg-15-init |
|
| #
64df5162 |
| 28-Jan-2022 |
Marek Kurdej <[email protected]> |
[clang-format] Fix misaligned trailing comments in the presence of an empty block comment.
Fixes https://github.com/llvm/llvm-project/issues/53441.
Expected code: ``` /**/ // int a; // ```
was b
[clang-format] Fix misaligned trailing comments in the presence of an empty block comment.
Fixes https://github.com/llvm/llvm-project/issues/53441.
Expected code: ``` /**/ // int a; // ```
was before misformatted to: ``` /**/ // int a; // ```
Because the "remaining length" (after the starting `/*`) of an empty block comment `/**/` was computed to be 0 instead of 2.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D118475
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
4dcfae6a |
| 01-Dec-2021 |
Manuel Klimek <[email protected]> |
Fix a violated precondition in clang-format.
Make sure we do not try to change line comments that are non-regular, i.e. do not start with "//" or "#". This can for example happen when "//" is broken
Fix a violated precondition in clang-format.
Make sure we do not try to change line comments that are non-regular, i.e. do not start with "//" or "#". This can for example happen when "//" is broken into two lines with an escaped newline.
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3 |
|
| #
418b4a7b |
| 27-Feb-2021 |
Björn Schäpers <[email protected]> |
[clang-format] Respect spaces in line comment section...
... without an active column limit.
Before line comments were not touched at all with ColumnLimit == 0.
Differential Revision: https://revi
[clang-format] Respect spaces in line comment section...
... without an active column limit.
Before line comments were not touched at all with ColumnLimit == 0.
Differential Revision: https://reviews.llvm.org/D96896
show more ...
|
|
Revision tags: llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3 |
|
| #
772eb24e |
| 29-Jan-2021 |
Björn Schäpers <[email protected]> |
[clang-format] Add option to control the spaces in a line comment
Differential Revision: https://reviews.llvm.org/D92257
|
| #
4ad41f1d |
| 29-Jan-2021 |
Björn Schäpers <[email protected]> |
Revert "[clang-format] Add option to control the spaces in a line comment"
This reverts commit 078f30e04d1fcb5a05d8e340f3178f3478075541.
|
|
Revision tags: llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
| #
078f30e0 |
| 26-Dec-2020 |
Björn Schäpers <[email protected]> |
[clang-format] Add option to control the spaces in a line comment
Differential Revision: https://reviews.llvm.org/D92257
|
| #
031743cb |
| 23-Dec-2020 |
mydeveloperday <[email protected]> |
[clang-format] PR48539 ReflowComments breaks Qt translation comments
https://bugs.llvm.org/show_bug.cgi?id=48539
Add support for Qt Translator Comments to reflow
When reflown and a part of the com
[clang-format] PR48539 ReflowComments breaks Qt translation comments
https://bugs.llvm.org/show_bug.cgi?id=48539
Add support for Qt Translator Comments to reflow
When reflown and a part of the comments are added on a new line, it should repeat these extra characters as part of the comment token.
Reviewed By: curdeius, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D93490
show more ...
|
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
7b7170fa |
| 09-Nov-2020 |
Krasimir Georgiev <[email protected]> |
[clang-format] avoid introducing multiline comments
In C++ with -Werror=comment, multiline comments are not allowed. clang-format could accidentally introduce multiline comments when reflowing. This
[clang-format] avoid introducing multiline comments
In C++ with -Werror=comment, multiline comments are not allowed. clang-format could accidentally introduce multiline comments when reflowing. This adapts clang-format to not introduce multiline comments by not allowing a break after `\`. Note that this does not apply to comment lines that already are multiline comments, such as comments in macros.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D90949
show more ...
|
| #
66a3b907 |
| 19-Oct-2020 |
Alex Richardson <[email protected]> |
[clang-format] Drop clangFrontend dependency for FormatTests
This allows building the clang-format unit tests in only 657 ninja steps rather than 1257 which allows for much faster incremental builds
[clang-format] Drop clangFrontend dependency for FormatTests
This allows building the clang-format unit tests in only 657 ninja steps rather than 1257 which allows for much faster incremental builds after a git pull.
Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D89709
show more ...
|
| #
b9e78944 |
| 17-Oct-2020 |
Sylvestre Ledru <[email protected]> |
Revert "[clang-format] Fix AlignConsecutive on PP blocks"
This reverts commit b2eb439317576ce718193763c12bff9fccdfc166.
Caused the regression: https://bugs.llvm.org/show_bug.cgi?id=47589
Reviewed
Revert "[clang-format] Fix AlignConsecutive on PP blocks"
This reverts commit b2eb439317576ce718193763c12bff9fccdfc166.
Caused the regression: https://bugs.llvm.org/show_bug.cgi?id=47589
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D89464
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
| #
b2eb4393 |
| 13-May-2020 |
mydeveloperday <[email protected]> |
[clang-format] Fix AlignConsecutive on PP blocks
Summary: Currently the 'AlignConsecutive*' options incorrectly align across elif and else statements, even if they are very far away and across unrel
[clang-format] Fix AlignConsecutive on PP blocks
Summary: Currently the 'AlignConsecutive*' options incorrectly align across elif and else statements, even if they are very far away and across unrelated preprocessor macros.
This failed since on preprocessor run 2+, there is not enough context about the #ifdefs to actually differentiate one block from another, causing them to align across different blocks or even large sections of the file.
Eg, with AlignConsecutiveAssignments:
``` \#if FOO // Run 1 \#else // Run 1 int a = 1; // Run 2, wrong \#endif // Run 1
\#if FOO // Run 1 \#else // Run 1 int bar = 1; // Run 2 \#endif // Run 1 ```
is read as
``` int a = 1; // Run 2, wrong int bar = 1; // Run 2 ```
The approach taken to fix this was to add a new flag to Token that forces breaking alignment across groups of lines (MustBreakAlignBefore) in a similar manner to the existing flag that forces a line break (MustBreakBefore). This flag is set for the first Token after a preprocessor statement or diff conflict marker.
Fixes #25167,#31281
Patch By: JakeMerdichAMD
Reviewed By: MyDeveloperDay
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79388
show more ...
|
| #
ece7e95f |
| 02-May-2020 |
mydeveloperday <[email protected]> |
[clang-format] NFC - clang-format the FormatTests
Summary: Ensure the clang-format unit tests are themselves clang-formatted
Having areas of the llvm code which are clang-format clean, give us more
[clang-format] NFC - clang-format the FormatTests
Summary: Ensure the clang-format unit tests are themselves clang-formatted
Having areas of the llvm code which are clang-format clean, give us more areas to run new clang-format binaries on ensuring we haven't broken anything.
It seems to me we SHOULD have this clang-formatted at a minimum, otherwise how can we expect others to use clang-format if we "don't eat our own dogfood", also if the tests are dependent on the formatting of the code then that would also be bad!
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang, #clang-format
Differential Revision: https://reviews.llvm.org/D79204
show more ...
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3, llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1, llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
| #
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <[email protected]> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3, llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
| #
9d717813 |
| 02-Aug-2018 |
Martin Probst <[email protected]> |
clang-format: fix a crash in comment wraps.
Summary: Previously, clang-format would crash if it tried to wrap an overlong single line comment, because two parts of the code inserted a break in the s
clang-format: fix a crash in comment wraps.
Summary: Previously, clang-format would crash if it tried to wrap an overlong single line comment, because two parts of the code inserted a break in the same location.
/** heregoesalongcommentwithnospace */
This wasn't previously noticed as it could only trigger for an overlong single line comment that did have no breaking opportunities except for a whitespace at the very beginning.
This also introduces a check for JavaScript to not ever wrap a comment before an opening curly brace:
/** @mods {donotbreakbeforethecurly} */
This is because some machinery parsing these tags sometimes supports breaks before a possible `{`, but in some other cases does not. Previously clang-format was careful never to wrap a line with certain tags on it. The better solution is to specifically disable wrapping before the problematic token: this allows wrapping and aligning comments but still avoids the problem.
Reviewers: krasimir
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50177
llvm-svn: 338706
show more ...
|
| #
6a5c95bd |
| 30-Jul-2018 |
Krasimir Georgiev <[email protected]> |
[clang-format] Indent after breaking Javadoc annotated line
Summary: This patch makes clang-format indent the subsequent lines created by breaking a long javadoc annotated line.
Reviewers: mprobst
[clang-format] Indent after breaking Javadoc annotated line
Summary: This patch makes clang-format indent the subsequent lines created by breaking a long javadoc annotated line.
Reviewers: mprobst
Reviewed By: mprobst
Subscribers: acoomans, cfe-commits
Differential Revision: https://reviews.llvm.org/D49797
llvm-svn: 338232
show more ...
|
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3 |
|
| #
4fc55a76 |
| 12-Jun-2018 |
Krasimir Georgiev <[email protected]> |
[clang-format] Fix crash while reflowing backslash in comments
Summary: The added test case was currently crashing with an assertion: ``` krasimir@krasimir> cat test.cc
[clang-format] Fix crash while reflowing backslash in comments
Summary: The added test case was currently crashing with an assertion: ``` krasimir@krasimir> cat test.cc ~ // How to run: // bbbbb run \ // rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr \ // <log_file> -- --output_directory="<output_directory>" krasimir@krasimir> ~/work/llvm-build/bin/clang-format test.cc ~ clang-format: /usr/local/google/home/krasimir/work/llvm/tools/clang/lib/Format/WhitespaceManager.cpp:117: void clang::format::WhitespaceManager::calculateLineBreakInformation(): Assertion `PreviousOriginalWhitespaceEndOffset <= OriginalWhitespaceStartOffset' failed. ``` The root cause was that BreakableToken was not considering the case of a reflow between an unescaped newline in a line comment.
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D48089
llvm-svn: 334527
show more ...
|
|
Revision tags: llvmorg-6.0.1-rc2 |
|
| #
3538b39e |
| 15-May-2018 |
Nicola Zaghen <[email protected]> |
[clang] Update uses of DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\
[clang] Update uses of DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
Explicitly avoided changing the strings in the clang-format tests.
Differential Revision: https://reviews.llvm.org/D44975
llvm-svn: 332350
show more ...
|
|
Revision tags: llvmorg-6.0.1-rc1 |
|
| #
c9a918c5 |
| 04-Apr-2018 |
Mark Zeren <[email protected]> |
[clang-format] In tests, expected code should be format-stable
Summary: Extend various verifyFormat helper functions to check that the expected text is "stable". This provides some protection agains
[clang-format] In tests, expected code should be format-stable
Summary: Extend various verifyFormat helper functions to check that the expected text is "stable". This provides some protection against bugs where formatting results are ocilating between two forms, or continually change in some other way.
Testing Done:
* Ran unit tests.
* Reproduced a known instability in preprocessor indentation which was caught by this new check.
Reviewers: krasimir
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D42034
llvm-svn: 329231
show more ...
|
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1, llvmorg-5.0.1, llvmorg-5.0.1-rc3 |
|
| #
48c930cb |
| 04-Dec-2017 |
Manuel Klimek <[email protected]> |
Fix bug where we wouldn't break columns over the limit.
Before, we would not break: int a = foo(/* trailing */); when the end of /* trailing */ was exactly the column limit; the reason is that blo
Fix bug where we wouldn't break columns over the limit.
Before, we would not break: int a = foo(/* trailing */); when the end of /* trailing */ was exactly the column limit; the reason is that block comments can have an unbreakable tail length - in this case 2, for the trailing ");"; we would unconditionally account that when calculating the column state at the end of the token, but not correctly add it into the remaining column length before, as we do for string literals. The fix is to correctly account the trailing unbreakable sequence length into our formatting decisions for block comments. Line comments cannot have a trailing unbreakable sequence, so no change is needed for them.
llvm-svn: 319642
show more ...
|