Revision tags: llvmorg-14.0.0 |
|
#
35abbf16 |
| 13-Mar-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Fix crash on asm block with label
Fixes https://github.com/llvm/llvm-project/issues/54349
Differential Revision: https://reviews.llvm.org/D121559
|
#
acd17a2b |
| 13-Mar-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Fix crash on invalid requires expression
Fixes https://github.com/llvm/llvm-project/issues/54350
Differential Revision: https://reviews.llvm.org/D121550
|
Revision tags: llvmorg-14.0.0-rc4 |
|
#
a140b710 |
| 11-Mar-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
[clang-format] Correctly format variable templates.
Fixes https://github.com/llvm/llvm-project/issues/54257.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan
Differential Revision: https:/
[clang-format] Correctly format variable templates.
Fixes https://github.com/llvm/llvm-project/issues/54257.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D121456
show more ...
|
Revision tags: llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
1e7cc72a |
| 24-Feb-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Allow to set token types final
We have a little problem. TokenAnnotator::resetTokenMetadata() resets the type, except for a (growing) whitelist. This is because the TokenAnnotator vis
[clang-format] Allow to set token types final
We have a little problem. TokenAnnotator::resetTokenMetadata() resets the type, except for a (growing) whitelist. This is because the TokenAnnotator visits some tokens multiple times. E.g. trying to identify if a < is an operator less or a template opener. And in some runs, which are bascially "reverted" the types are reset.
On the other hand, if the parser does already know the type, it should be able to set it, without it being reset. So we introduce the ability to set a type and make that final.
Differential Revision: https://reviews.llvm.org/D120511
show more ...
|
#
a74ff3ac |
| 23-Feb-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format][NFC] Rename test and remove comments
Why put "InMacros" in the name? We test other things to, and I will add more, withut macros.
Also all our tests are regression tests.
Differenti
[clang-format][NFC] Rename test and remove comments
Why put "InMacros" in the name? We test other things to, and I will add more, withut macros.
Also all our tests are regression tests.
Differential Revision: https://reviews.llvm.org/D120401
show more ...
|
#
1d03548f |
| 22-Feb-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format][NFC] Remove redundant semi
All "calls" have a semi, as they should, remove the one from the macro.
Differential Revision: https://reviews.llvm.org/D120359
|
#
be9a7fdd |
| 15-Feb-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Fixed handling of requires clauses followed by attributes
Fixes https://github.com/llvm/llvm-project/issues/53820.
Differential Revision: https://reviews.llvm.org/D119893
|
#
d81f003c |
| 14-Feb-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
[clang-format] Fix formatting of struct-like records followed by variable declaration.
Fixes https://github.com/llvm/llvm-project/issues/24781. Fixes https://github.com/llvm/llvm-project/issues/3816
[clang-format] Fix formatting of struct-like records followed by variable declaration.
Fixes https://github.com/llvm/llvm-project/issues/24781. Fixes https://github.com/llvm/llvm-project/issues/38160.
This patch splits `TT_RecordLBrace` for classes/enums/structs/unions (and other records, e.g. interfaces) and uses the brace type to avoid the error-prone scanning for record token.
The mentioned bugs were provoked by the scanning being too limited (and so not considering `const` or `constexpr`, or other qualifiers, on an anonymous struct variable declaration).
Moreover, the proposed solution is more efficient as we parse tokens once only (scanning being parsing too).
Reviewed By: MyDeveloperDay, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D119785
show more ...
|
Revision tags: llvmorg-14.0.0-rc1 |
|
#
bcd1e461 |
| 07-Feb-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Further improve support for requires expressions
Detect requires expressions in more unusable contexts. This is far from perfect, but currently we have no good metric to decide betwee
[clang-format] Further improve support for requires expressions
Detect requires expressions in more unusable contexts. This is far from perfect, but currently we have no good metric to decide between a requires expression and a trailing requires clause.
Differential Revision: https://reviews.llvm.org/D119138
show more ...
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
9aab0db1 |
| 05-Nov-2021 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Improve require and concept handling
- Added an option where to put the requires clauses. - Renamed IndentRequires to IndentRequiresClause. - Changed BreakBeforeConceptDeclaration fro
[clang-format] Improve require and concept handling
- Added an option where to put the requires clauses. - Renamed IndentRequires to IndentRequiresClause. - Changed BreakBeforeConceptDeclaration from bool to an enum.
Fixes https://llvm.org/PR32165, and https://llvm.org/PR52401.
Differential Revision: https://reviews.llvm.org/D113319
show more ...
|
#
a77c67f9 |
| 09-Feb-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
[clang-format] Fix formatting of the array form of delete.
Fixes https://github.com/llvm/llvm-project/issues/53576.
There was an inconsistency in formatting of delete expressions.
Before: ``` dele
[clang-format] Fix formatting of the array form of delete.
Fixes https://github.com/llvm/llvm-project/issues/53576.
There was an inconsistency in formatting of delete expressions.
Before: ``` delete (void*)a; delete[](void*) a; ```
After this patch: ``` delete (void*)a; delete[] (void*)a; ```
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D119117
show more ...
|
#
35f7dd60 |
| 04-Feb-2022 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Fix a bug in setting type FunctionLBrace
The l_brace token in a macro definition should not be set to TT_FunctionLBrace.
This patch could have fixed #42087.
Differential Revisi
[clang-format][NFC] Fix a bug in setting type FunctionLBrace
The l_brace token in a macro definition should not be set to TT_FunctionLBrace.
This patch could have fixed #42087.
Differential Revision: https://reviews.llvm.org/D118969
show more ...
|
#
36622c4e |
| 27-Jan-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
[clang-format] Fix AllowShortFunctionsOnASingleLine: InlineOnly with wrapping after record.
Fixes https://github.com/llvm/llvm-project/issues/53430.
Initially, I had a quick and dirty approach, but
[clang-format] Fix AllowShortFunctionsOnASingleLine: InlineOnly with wrapping after record.
Fixes https://github.com/llvm/llvm-project/issues/53430.
Initially, I had a quick and dirty approach, but it led to a myriad of special cases handling comments (that may add unwrapped lines). So I added TT_RecordLBrace type annotations and it seems like a much nicer solution. I think that in the future it will allow us to clean up some convoluted code that detects records.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D118337
show more ...
|
Revision tags: 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, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
#
75a1790f |
| 27-Oct-2020 |
Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> |
Fix use-after-scope introduced in 850325348ae82cd5e26ea9edfd04219d0fbe7828
|
#
85032534 |
| 27-Oct-2020 |
Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> |
[clang-format] Fix misformatted macro definitions after D86959
After D86959 the code `#define lambda [](const decltype(x) &ptr) {}` was formatted as `#define lambda [](const decltype(x) & ptr) {}` d
[clang-format] Fix misformatted macro definitions after D86959
After D86959 the code `#define lambda [](const decltype(x) &ptr) {}` was formatted as `#define lambda [](const decltype(x) & ptr) {}` due to now parsing the '&' token as a BinaryOperator. The problem was caused by the condition `Line.InPPDirective && (!Left->Previous || !Left->Previous->is(tok::identifier))) {` being matched and therefore not performing the checks for "previous token is one of decltype/_Atomic/etc.". This patch moves those checks after the existing if/else chain to ensure the left-parent token classification is always run after checking whether the contents of the parens is an expression or not.
This change also introduces a new TokenAnnotatorTest that checks the token kind and Role of Tokens after analyzing them. This is used to check for TT_PointerOrReference, in addition to indirectly testing this based on the resulting formatting.
Reviewed By: MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D88956
show more ...
|