diff options
author | Emilia Dreamer <emilia@rymiel.space> | 2023-03-26 04:37:59 +0300 |
---|---|---|
committer | Emilia Dreamer <emilia@rymiel.space> | 2023-03-26 04:38:26 +0300 |
commit | 5409fb38372dbf65a94725ccefab2b993fbb7a9b (patch) | |
tree | c98f6333b5f6450bf0d49ec10284ca7119117960 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | |
parent | cd67bbdc2496fbba68c818c6ff82007d89d2bb40 (diff) | |
download | llvm-5409fb38372dbf65a94725ccefab2b993fbb7a9b.zip llvm-5409fb38372dbf65a94725ccefab2b993fbb7a9b.tar.gz llvm-5409fb38372dbf65a94725ccefab2b993fbb7a9b.tar.bz2 |
[clang-format] Annotate lambdas with requires clauses.
The C++ grammar allows lambdas to have a *requires-clause* in two
places, either directly after the *template-parameter-list*, such as:
`[] <typename T> requires foo<T> (T t) { ... };`
Or, at the end of the *lambda-declarator* (before the lambda's body):
`[] <typename T> (T t) requires foo<T> { ... };`
Previously, these cases weren't handled at all, resulting in weird
results.
Note that this commit only handles token annotation, so the actual
formatting still ends up suboptimal. This is mostly because I do not yet
know how to approach making the requires clause formatting of lambdas
match the formatting for functions.
Fixes https://github.com/llvm/llvm-project/issues/61269
Reviewed By: HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D145642
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions