Revision tags: llvmorg-15.0.0 |
|
#
3bbdf06b |
| 30-Aug-2022 |
jackh <jackhuang1205@gmail.com> |
[clang-format] Fix annotating when deleting array of pointers
Fixes https://github.com/llvm/llvm-project/issues/57418
The token `*` below should be annotated as `UnaryOperator`.
``` delete[] *ptr;
[clang-format] Fix annotating when deleting array of pointers
Fixes https://github.com/llvm/llvm-project/issues/57418
The token `*` below should be annotated as `UnaryOperator`.
``` delete[] *ptr; ```
Reviewed By: owenpan, MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D132911
show more ...
|
Revision tags: llvmorg-15.0.0-rc3 |
|
#
47e70569 |
| 23-Aug-2022 |
owenca <owenpiano@gmail.com> |
[clang-format] Remove an extraneous test in TokenAnnotatorTest.cpp
This removes an obsolete test case introduced by mistake from commit 2e36120726ee46cbfd3eee1e9244bdd756dee92d.
|
#
2e361207 |
| 16-Aug-2022 |
owenca <owenpiano@gmail.com> |
[clang-format] Fix regressions in WhitespaceSensitiveMacros
Fixes #54522. Fixes #57158.
Differential Revision: https://reviews.llvm.org/D132001
|
#
d90c1bcd |
| 22-Aug-2022 |
owenca <owenpiano@gmail.com> |
Revert "[clang-format][NFC] Fix a bug in setting type FunctionLBrace"
This reverts commit 35f7dd601d33219fafa2c0d308e187df3e36847a.
Fixes #57200.
|
#
ef71383b |
| 13-Aug-2022 |
jackh <jackhuang1205@gmail.com> |
[clang-format] Distinguish logical and after bracket from reference
Fix commit `b646f0955574` and remove redundant code.
Differential Revision: https://reviews.llvm.org/D131750
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1 |
|
#
c8871948 |
| 29-Jul-2022 |
sstwcw <f0gukp2nk@protonmail.com> |
[clang-format] Handle Verilog case statements
These statements are like switch statements in C, but without the 'case' keyword in labels.
How labels are parsed. In UnwrappedLineParser, the program
[clang-format] Handle Verilog case statements
These statements are like switch statements in C, but without the 'case' keyword in labels.
How labels are parsed. In UnwrappedLineParser, the program tries to parse a statement every time it sees a colon. In TokenAnnotator, a colon that isn't part of an expression is annotated as a label.
The token type `TT_GotoLabelColon` is added. We did not include Verilog in the name because we thought we would eventually have to fix the problem that case labels in C can't contain ternary conditional expressions and we would use that token type.
The style is like below. Labels are on separate lines and indented by default. The linked style guide also has examples where labels and the corresponding statements are on the same lines. They are not supported for now.
https://github.com/lowRISC/style-guides/blob/master/VerilogCodingStyle.md
``` case (state_q) StIdle: state_d = StA; StA: begin state_d = StB; end endcase ```
Differential Revision: https://reviews.llvm.org/D128714
show more ...
|
#
6db0c18b |
| 28-Jul-2022 |
sstwcw <f0gukp2nk@protonmail.com> |
[clang-format] Handle Verilog modules
Now things inside hierarchies like modules and interfaces are indented. When the module header spans multiple lines, all except the first line are indented as
[clang-format] Handle Verilog modules
Now things inside hierarchies like modules and interfaces are indented. When the module header spans multiple lines, all except the first line are indented as continuations. We added the property `IsContinuation` to mark lines that should be indented this way.
In order that the colons inside square brackets don't get labeled as `TT_ObjCMethodExpr`, we added a check to only use this type when the language is not Verilog.
Differential Revision: https://reviews.llvm.org/D128712
show more ...
|
#
67480b36 |
| 28-Jul-2022 |
sstwcw <f0gukp2nk@protonmail.com> |
[clang-format] Handle Verilog blocks
Now stuff inside begin-end blocks get indented.
Some tests are moved into FormatTestVerilog.Block from FormatTestVerilog.If because they have nothing to do with
[clang-format] Handle Verilog blocks
Now stuff inside begin-end blocks get indented.
Some tests are moved into FormatTestVerilog.Block from FormatTestVerilog.If because they have nothing to do with if statements.
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D128711
show more ...
|
#
f93182a8 |
| 28-Jul-2022 |
sstwcw <f0gukp2nk@protonmail.com> |
[clang-format] Handle Verilog numbers and operators
Reviewed By: HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D126845
|
#
17fb8797 |
| 27-Jul-2022 |
Denis Fatkulin <fatkulin.denis@huawei.com> |
[clang-format] FIX: Misannotation 'auto' as trailing return type in lambdas
Lambdas with trailing return type 'auto' are annotated incorrectly. It causes a misformatting. The simpliest code to repro
[clang-format] FIX: Misannotation 'auto' as trailing return type in lambdas
Lambdas with trailing return type 'auto' are annotated incorrectly. It causes a misformatting. The simpliest code to reproduce is:
``` auto list = {[]() -> auto { return 0; }}; ```
Fixes https://github.com/llvm/llvm-project/issues/54798
Reviewed By: HazardyKnusperkeks, owenpan, curdeius
Differential Revision: https://reviews.llvm.org/D130299
show more ...
|
Revision tags: llvmorg-16-init |
|
#
a4c62f66 |
| 19-Jul-2022 |
owenca <owenpiano@gmail.com> |
[clang-format][NFC] Refactor RequiresDoesNotChangeParsingOfTheRest
Differential Revision: https://reviews.llvm.org/D129982
|
#
d2eda492 |
| 16-Jul-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Mark constexpr lambdas as lambda
Otherwise the brace was detected as a function brace, not wrong per se, but when directly calling the lambda the calling parens were put on the next l
[clang-format] Mark constexpr lambdas as lambda
Otherwise the brace was detected as a function brace, not wrong per se, but when directly calling the lambda the calling parens were put on the next line.
Differential Revision: https://reviews.llvm.org/D129946
show more ...
|
#
2b04c41b |
| 04-Jul-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Fix misannotation of colon in presence of requires clause
For clauses without parentheses it was annotated as TT_InheritanceColon. Relates to https://github.com/llvm/llvm-project/issu
[clang-format] Fix misannotation of colon in presence of requires clause
For clauses without parentheses it was annotated as TT_InheritanceColon. Relates to https://github.com/llvm/llvm-project/issues/56215
Differential Revision: https://reviews.llvm.org/D129940
show more ...
|
#
8dd2ef21 |
| 15-Jul-2022 |
Krasimir Georgiev <krasimir@google.com> |
[clang-format] distinguish multiplication after brace-init from pointer
After https://github.com/llvm/llvm-project/commit/b646f0955574c6ad4c156c9db522e46f597cfda9, the added regression test started
[clang-format] distinguish multiplication after brace-init from pointer
After https://github.com/llvm/llvm-project/commit/b646f0955574c6ad4c156c9db522e46f597cfda9, the added regression test started being formatted as-if the multiplication `*` was a pointer. This adapts the heuristic to distinguish between these two cases.
Reviewed By: jackhong12, curdeius, HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D129771
show more ...
|
#
b646f095 |
| 29-Jun-2022 |
Huang Zhen-Hong <jackhunag1205@gmail.com> |
[clang-format] Fix misplacement of `*` in declaration of pointer to struct
Fixes #55810
Differential Revision: https://reviews.llvm.org/D127873
|
#
b3aeca39 |
| 24-Jun-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Further improve requires clause detection
If there is a typeish token before the requires, it can't be a requires expression.
Fixes https://github.com/llvm/llvm-project/issues/56176
[clang-format] Further improve requires clause detection
If there is a typeish token before the requires, it can't be a requires expression.
Fixes https://github.com/llvm/llvm-project/issues/56176
Differential Revision: https://reviews.llvm.org/D128496
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
#
2601355d |
| 13-May-2022 |
owenca <owenpiano@gmail.com> |
[clang-format][NFC] Format unit tests with insert/remove braces
This patch is the result of running clang-format version 753fe33 in clang/unittests/Format/: clang-format -style="{InsertBraces: true,
[clang-format][NFC] Format unit tests with insert/remove braces
This patch is the result of running clang-format version 753fe33 in clang/unittests/Format/: clang-format -style="{InsertBraces: true, RemoveBracesLLVM: true}" -i *.cpp *.h
Differential Revision: https://reviews.llvm.org/D125510
show more ...
|
#
dab5e10e |
| 11-May-2022 |
Sergey Semushin <predelnik@gmail.com> |
[clang-format] fix nested angle brackets parse inside concept definition
Due to how parseBracedList always stopped on the first closing angle bracket and was used in parsing angle bracketed expressi
[clang-format] fix nested angle brackets parse inside concept definition
Due to how parseBracedList always stopped on the first closing angle bracket and was used in parsing angle bracketed expression inside concept definition, nested brackets inside concepts were parsed incorrectly.
nextToken() call before calling parseBracedList is required because we were processing opening angle bracket inside parseBracedList second time leading to incorrect logic after my fix.
Fixes https://github.com/llvm/llvm-project/issues/54943 Fixes https://github.com/llvm/llvm-project/issues/54837
Reviewed By: HazardyKnusperkeks, curdeius
Differential Revision: https://reviews.llvm.org/D123896
show more ...
|
Revision tags: llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
c261f78d |
| 24-Apr-2022 |
sstwcw <f0gukp2nk@protonmail.com> |
[clang-format] Refactor determineStarAmpUsage NFC
There was some duplicate code in determineStarAmpUsage and determinePlusMinusCaretUsage
Now a `-` or `+` following `;`, `sizeof`, `co_await`, or `d
[clang-format] Refactor determineStarAmpUsage NFC
There was some duplicate code in determineStarAmpUsage and determinePlusMinusCaretUsage
Now a `-` or `+` following `;`, `sizeof`, `co_await`, or `delete` is regarded as a unary operator.
Now a `*` or `&` following `case` is also a unary operator.
Reviewed By: curdeius, MyDeveloperDay, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D121754
show more ...
|
Revision tags: llvmorg-14.0.1 |
|
#
be5c3ca7 |
| 24-Mar-2022 |
Krasimir Georgiev <krasimir@google.com> |
Revert "[clang-format] Correctly recognize arrays in template parameter list."
This reverts commit 126b37a713dc1c67cbc7dc8b5288b2f907c906a9.
Regressed some ObjC patterns, see comments on https://re
Revert "[clang-format] Correctly recognize arrays in template parameter list."
This reverts commit 126b37a713dc1c67cbc7dc8b5288b2f907c906a9.
Regressed some ObjC patterns, see comments on https://reviews.llvm.org/D121584.
show more ...
|
#
1db81123 |
| 14-Mar-2022 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] Fix crash with ObjC Blocks
Fixes https://github.com/llvm/llvm-project/issues/54367 Fixes https://github.com/llvm/llvm-project/issues/54368
Differential Revision: https://reviews.llvm
[clang-format] Fix crash with ObjC Blocks
Fixes https://github.com/llvm/llvm-project/issues/54367 Fixes https://github.com/llvm/llvm-project/issues/54368
Differential Revision: https://reviews.llvm.org/D121596
show more ...
|
#
3227aa3a |
| 15-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 ...
|
#
e60defb9 |
| 15-Mar-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
[clang-format] Add regression tests for function ref qualifiers on operator definition. NFC.
Fixes https://github.com/llvm/llvm-project/issues/54374.
|
#
126b37a7 |
| 14-Mar-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
[clang-format] Correctly recognize arrays in template parameter list.
Fixes https://github.com/llvm/llvm-project/issues/54245.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan
Differential
[clang-format] Correctly recognize arrays in template parameter list.
Fixes https://github.com/llvm/llvm-project/issues/54245.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D121584
show more ...
|
#
a6b2f50f |
| 14-Mar-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
Revert "[clang-format] Correctly format variable templates."
This reverts commit a140b7104fdae0d9eff5b18efbc784754e0ca274.
It provoked the bug https://github.com/llvm/llvm-project/issues/54374.
|