llvm-project/clang/unittests/Format
Emilia Dreamer 1fa115b569
[clang-format] Correctly indent closing brace of compound requires
When a compound requirement is too long to fit onto a single line, the
braces are split apart onto separate lines, and the contained expression
is indented. However, this indentation would also apply to the closing
brace and the trailing return type requirement thereof.
This was because the indentation level was being restored after all
trailing things were already read

With this change, the initial level of the opening brace is set before
attempting to read any trailing return type requirements

Fixes https://github.com/llvm/llvm-project/issues/57108

Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D134626
2022-10-01 08:16:57 +03:00
..
.clang-format [clang-format][NFC] Reformat the clang/unittests/Format directory 2022-09-21 13:26:59 -07:00
CMakeLists.txt [clang-format] Add MacroUnexpander. 2022-07-12 07:11:46 +00:00
CleanupTest.cpp [clang-format] Drop clangFrontend dependency for FormatTests 2020-10-20 10:13:28 +01:00
DefinitionBlockSeparatorTest.cpp [clang-format] Format unit tests with InsertBraces/RemoveBracesLLVM 2022-05-21 16:13:35 -07:00
FormatTest.cpp [clang-format] Correctly indent closing brace of compound requires 2022-10-01 08:16:57 +03:00
FormatTestCSharp.cpp [clang-format] Handle constructor invocations after new operator in C# correct 2022-09-25 21:10:26 -07:00
FormatTestComments.cpp [clang-format] Add space to comments starting with '#'. 2022-03-13 21:56:22 +01:00
FormatTestJS.cpp [clang-format] Indent import statements in JavaScript. 2022-03-30 23:17:27 +00:00
FormatTestJava.cpp [clang-format] Fix aligning of java-style declarations 2022-08-15 20:27:15 -07:00
FormatTestJson.cpp [clang-format] JSON formatting add new option for controlling newlines in json arrays 2022-09-19 17:54:39 +01:00
FormatTestObjC.cpp [clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol 2021-10-20 09:09:31 +01:00
FormatTestProto.cpp
FormatTestRawStrings.cpp clang-format: use `pb` as a canonical raw string delimiter for google style 2021-03-09 09:07:14 +01:00
FormatTestSelective.cpp [clang-format] Avoid crash in LevelIndentTracker. 2022-07-07 10:15:45 +02:00
FormatTestTableGen.cpp
FormatTestTextProto.cpp [clang-format] don't break up #-style comment sections 2022-03-22 15:29:02 +01:00
FormatTestUtils.h [clang-format] Parse Verilog if statements 2022-06-26 01:52:15 +00:00
FormatTestVerilog.cpp [clang-format] Handle Verilog attributes 2022-07-29 00:38:30 +00:00
MacroCallReconstructorTest.cpp [clang-format][NFC] Reformat the clang/unittests/Format directory 2022-09-21 13:26:59 -07:00
MacroExpanderTest.cpp [clang-format] Reformat. NFC. 2022-03-17 09:27:31 +01:00
NamespaceEndCommentsFixerTest.cpp [clang-format] Reformat. NFC. 2022-03-17 09:27:31 +01:00
QualifierFixerTest.cpp [clang-format] Fix QualifierAlignment with global namespace qualified types. 2022-05-26 15:02:33 +02:00
SortImportsTestJS.cpp clang-format: [JS] sort import aliases. Users can define aliases for long symbols using import aliases: 2022-01-28 11:51:28 +01:00
SortImportsTestJava.cpp [clang-format] Add case aware include sorting. 2021-02-02 15:12:27 +01:00
SortIncludesTest.cpp [clang-format] add a regression test for include sorting 2022-04-28 11:02:14 +02:00
TestLexer.h [clang-format] Reformat. NFC. 2022-03-17 09:27:31 +01:00
TokenAnnotatorTest.cpp [clang-format] Look ahead before consuming `bool` in requires clause. 2022-09-25 20:30:21 +03:00
UsingDeclarationsSorterTest.cpp