diff options
| author | Marek Kurdej <marek.kurdej+llvm.org@gmail.com> | 2022-04-13 14:06:57 +0200 |
|---|---|---|
| committer | Marek Kurdej <marek.kurdej+llvm.org@gmail.com> | 2022-05-09 10:59:33 +0200 |
| commit | 50cd52d9357224cce66a9e00c9a0417c658a5655 (patch) | |
| tree | e36d451d715c41b703e2f2263f088b617b94a019 /llvm/unittests/Support/TargetParserTest.cpp | |
| parent | 02f8519502447de6ef69a85fa8de5732dd59d853 (diff) | |
| download | llvm-50cd52d9357224cce66a9e00c9a0417c658a5655.zip llvm-50cd52d9357224cce66a9e00c9a0417c658a5655.tar.gz llvm-50cd52d9357224cce66a9e00c9a0417c658a5655.tar.bz2 | |
[clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.
Fixes https://github.com/llvm/llvm-project/issues/54522.
This fixes regression introduced in https://github.com/llvm/llvm-project/commit/5e5efd8a91f2e340e79a73bedbc6ab66ad4a4281.
Before the culprit commit, macros in WhitespaceSensitiveMacros were correctly formatted even if their closing parenthesis weren't followed by semicolon (or, to be precise, when they were followed by a newline).
That commit changed the type of the macro token type from TT_UntouchableMacroFunc to TT_FunctionLikeOrFreestandingMacro.
Correct formatting (with `WhitespaceSensitiveMacros = ['FOO']`):
```
FOO(1+2)
FOO(1+2);
```
Regressed formatting:
```
FOO(1 + 2)
FOO(1+2);
```
Reviewed By: HazardyKnusperkeks, owenpan, ksyx
Differential Revision: https://reviews.llvm.org/D123676
Diffstat (limited to 'llvm/unittests/Support/TargetParserTest.cpp')
0 files changed, 0 insertions, 0 deletions
