llvm-project/clang/unittests/Format
Owen Pan e33243c950 [clang-format] Link the braces of a block in UnwrappedLineParser
This includes TT_MacroBlockBegin and TT_MacroBlockEnd as well.

We can no longer use MatchingParen of FormatToken as an indicator
to mark optional braces. Instead, we directly set Optional of an
l_brace first and reset it later if it turns out that the braces
are not optional.

Also added a test case for deeply nested loops.

Differential Revision: https://reviews.llvm.org/D139257
2022-12-04 12:01:26 -08:00
..
.clang-format [clang-format][NFC] Reformat the clang/unittests/Format directory 2022-09-21 13:26:59 -07:00
BracesInserterTest.cpp [clang-format] Move InsertBraces unit tests out of FormatTest.cpp 2022-10-27 01:29:31 -07:00
BracesRemoverTest.cpp [clang-format] Link the braces of a block in UnwrappedLineParser 2022-12-04 12:01:26 -08:00
CMakeLists.txt [clang-format][NFC] Moved configuration parsing tests in own file 2022-11-16 07:02:09 +01:00
CleanupTest.cpp
ConfigParseTest.cpp [clang-format][NFC] Moved configuration parsing tests in own file 2022-11-16 07:02:09 +01:00
DefinitionBlockSeparatorTest.cpp [clang-format] Format unit tests with InsertBraces/RemoveBracesLLVM 2022-05-21 16:13:35 -07:00
FormatTest.cpp [clang-format] Fix a crash due to dereferencing null MatchingParen 2022-11-21 12:33:51 -08:00
FormatTestCSharp.cpp [Format] Don't crash on mismatched brackets 2022-11-24 15:14:06 +01:00
FormatTestComments.cpp [clang-format] Don't move comments if AlignTrailingComments: Leave 2022-12-01 16:07:06 -08:00
FormatTestJS.cpp [Format] Drop speculative test added in previous patch, it hits asserts? 2022-10-06 17:57:58 +02: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 Fix test output regression from ee88c0cf09. 2022-11-25 13:53:34 +00: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] Remove special case for kw_operator when aligning decls 2022-11-17 11:38:28 +02:00
UsingDeclarationsSorterTest.cpp