Revision tags: llvmorg-21-init |
|
#
9452ee4f |
| 27-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Treat uppercase identifiers after struct as macros (#124397)
This restores the behavior before llvmorg-20-init.
Fixes #94184.
Fixes #117477.
Fixes #122690.
Fixes #123142.
|
#
33656932 |
| 21-Jan-2025 |
Sirraide <aeternalmail@gmail.com> |
[clang-format] Rename ExportBlockIndentation -> IndentExportBlock (#123493)
This renames the `ExportBlockIndentation` option and adds a config parse test, as requested in #110381.
|
#
106c483a |
| 18-Jan-2025 |
Sirraide <aeternalmail@gmail.com> |
[clang-format] Improve brace wrapping and add an option to control indentation of `export { ... }` (#110381)
`export { ... }` blocks can get a bit long, so I thought it would make sense to have an o
[clang-format] Improve brace wrapping and add an option to control indentation of `export { ... }` (#110381)
`export { ... }` blocks can get a bit long, so I thought it would make sense to have an option that makes it so their contents are not indented (basically the same argument as for namespaces).
This is based on the `NamespaceIndentation` option, except that there is no option to control the behaviour of `export` blocks when nested because nesting them doesn’t really make sense.
Additionally, brace wrapping of short `export { ... }` blocks is now controlled by the `AllowShortBlocksOnASingleLine` option. There is no separate option just for `export` blocks because you can just write e.g. `export int x;` instead of `export { int x; }`.
This closes #121723.
show more ...
|
#
a7bca186 |
| 18-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Correctly annotate braces in macro definitions (#123279)
Fixes #123179.
|
Revision tags: llvmorg-19.1.7 |
|
#
00934505 |
| 05-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add `TT_CompoundRequirementLBrace` for better annotation (#121539)
Also, add `ST_CompoundRequirement` to help annotating */&/&& in compound
requirement expressions as `TT_BinaryOpera
[clang-format] Add `TT_CompoundRequirementLBrace` for better annotation (#121539)
Also, add `ST_CompoundRequirement` to help annotating */&/&& in compound
requirement expressions as `TT_BinaryOperator`.
Fixes #121471.
show more ...
|
#
c1ea05ea |
| 05-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Don't break short macro call followed by l_paren (#121626)
Fixes #105658.
|
#
44b83e81 |
| 05-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add TT_AfterPPDirective for better annotation (#121622)
For now, we only need to annotate the token after #error or #warning.
Fixes #117706.
|
#
04610b90 |
| 05-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Replace SmallVectorImpl with ArrayRef (#121621)
|
#
b1b60d4c |
| 18-Dec-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Fix a bug in annotating arrows after init braces (#119958)
Fixes #59066.
|
Revision tags: llvmorg-19.1.6 |
|
#
54ca1c42 |
| 11-Dec-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Fix idempotent format of hash in macro body (#118513)
Fixes #118334.
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
0ff8b791 |
| 13-Nov-2024 |
sstwcw <su3e8a96kzlver@posteo.net> |
[clang-format] Stop crashing on slightly off Verilog module headers (#116000)
This piece of code made the program crash.
```Verilog function pkg::t get (int t = 2, int f = 2); ```
The way
[clang-format] Stop crashing on slightly off Verilog module headers (#116000)
This piece of code made the program crash.
```Verilog function pkg::t get (int t = 2, int f = 2); ```
The way the code is supposed to be parsed is that UnwrappedLineParser should identify the function header, and then TokenAnnotator should recognize the result. But the code in UnwrappedLineParser would mistakenly not recognize it due to the `::`. Then TokenAnnotator would recognize the comma both as TT_VerilogInstancePortComma and TT_VerilogTypeComma. The code for annotating the instance port comma used `setFinalizedType`. The program would crash when it tried to set it to another type.
The code in UnwrappedLineParser now recognizes the `::` token.
The are other cases in which TokenAnnotator would recognize the comma as both of those types, for example if the `function` keyword is removed. The type is now set using `setType` instead so that the program does not crash. The developer no longer knows why he used `setFinalizedType` back then.
show more ...
|
#
6ca816f8 |
| 02-Nov-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Fix a regression in parsing `switch` in macro call (#114506)
Fixes #114408.
|
Revision tags: llvmorg-19.1.3 |
|
#
d005be33 |
| 23-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Handle C# `goto case` constructs (#113257)
Fixes #113256.
|
#
aea60ab9 |
| 22-Oct-2024 |
Emilia Kond <emilia@rymiel.space> |
[clang-format] Make bitwise and imply requires clause (#110942)
This patch adjusts the requires clause/expression parser to imply a
requires clause if it is preceded by a bitwise and operator `&`,
[clang-format] Make bitwise and imply requires clause (#110942)
This patch adjusts the requires clause/expression parser to imply a
requires clause if it is preceded by a bitwise and operator `&`, and
assume it is a reference qualifier. The justification is that bitwise
operations should not be used for requires expressions.
This is a band-aid fix. The real problems lie in the lookahead heuristic
in the same method. It may be worth it to rewrite that whole heuristic
to track more state in the future, instead of just blindly marching
forward across multiple unrelated definitions, since right now, the
definition following the one with the requires clause can influence
whether the heuristic chooses clause or expression.
Fixes https://github.com/llvm/llvm-project/issues/110485
show more ...
|
#
b5bcdb5c |
| 22-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Fix a crash on C# `goto case` (#113056)
Fixes #113011.
|
#
67f576f3 |
| 18-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Handle template opener/closer in braced list (#112494)
Fixes #112487.
|
Revision tags: 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 ...
|
#
e5b05a51 |
| 05-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Handle template closer followed by braces (#110971)
Fixes #110968.
|
#
14e1fef7 |
| 03-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Handle template closer followed by empty paretheses (#110408)
Fixes #109925.
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0 |
|
#
04d71ea1 |
| 16-Sep-2024 |
kadir çetinkaya <kadircet@google.com> |
[Format] Dont treat LBrace after extends/implements as initializer list (#108524)
This extends the fix in https://github.com/llvm/llvm-project/pull/106242
for other derived class types.
|
#
616a8ce6 |
| 06-Sep-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Correctly annotate braces in macro definition (#107352)
Also add a test case for #107096.
Fixes #106418.
|
#
3449ed8d |
| 04-Sep-2024 |
Owen Pan <owenpiano@gmail.com> |
Revert "[clang-format] Correctly annotate braces in macro definition (#106662)"
This reverts commit 0fa78b6c7bd43c2498700a98c47a02cf4fd06388 due to regression.
Fixes #107096.
|
Revision tags: llvmorg-19.1.0-rc4 |
|
#
0fa78b6c |
| 02-Sep-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Correctly annotate braces in macro definition (#106662)
Fixes #106418.
|
#
e0f2368c |
| 31-Aug-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Correctly annotate braces in ObjC square brackets (#106654)
See
https://github.com/llvm/llvm-project/pull/88238#issuecomment-2316954781.
|
#
7579787e |
| 30-Aug-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Correctly identify token-pasted record names (#106484)
See
https://github.com/llvm/llvm-project/pull/89706#issuecomment-2315549955.
|