llvm-project/clang/unittests
Krasimir Georgiev 91700e0793 [clang-format] Fixes indentation of inner text proto messages
Summary:
Consider the text proto:
```
message {
  sub { key: value }
}
```
Previously the first `{` was TT_Unknown, which caused the inner message to be
indented by the continuation width. This didn't happen for:
```
message {
  sub: { key: value }
}
```
This is because the code to mark the first `{` as a TT_DictLiteral was only
considering the case where it marches forward and reaches a `:`.

This patch updates this by looking not only for `:`, but also for `<` and `{`.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D42500

llvm-svn: 323419
2018-01-25 14:10:43 +00:00
..
AST Refactor RecursiveASTVisitor test for post-order traversal 2018-01-24 09:40:16 +00:00
ASTMatchers Add hasTrailingReturn AST matcher 2018-01-22 22:45:23 +00:00
Analysis [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Basic [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
CodeGen Unit tests for TBAA metadata generation. 2017-12-22 15:22:45 +00:00
CrossTU [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Driver [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Format [clang-format] Fixes indentation of inner text proto messages 2018-01-25 14:10:43 +00:00
Frontend [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Lex [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral. 2018-01-12 18:54:35 +00:00
Rename [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Rewrite [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Sema [Sema] Add visited contexts to CodeCompleteContext 2018-01-17 14:29:25 +00:00
StaticAnalyzer [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
Tooling Refactor RecursiveASTVisitor test for post-order traversal 2018-01-24 09:40:16 +00:00
libclang [libclang] Add PrintingPolicy for pretty printing declarations 2018-01-16 10:19:56 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00