llvm-project/clang/unittests/Format
Martin Probst f326b6b975 clang-format: [JS] don't break comments before any '{'
Summary:
Previously, clang-format would avoid breaking before the first `{`
found, but then happily break before subsequent '{'s on the line. This
change fixes that by looking for the first location that has no opening
curly, if any.

This fixes the original commit by correcting the loop condition.

This reverts commit 66dc646e09b795b943668179c33d09da71a3b6bc.

Reviewers: krasimir

Subscribers: cfe-commits

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

llvm-svn: 338890
2018-08-03 13:58:33 +00:00
..
CMakeLists.txt [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
CleanupTest.cpp [Tooling] Pull #include manipulation code from clangFormat into libToolingCore. 2018-05-14 20:17:53 +00:00
FormatTest.cpp [Format] Fix for bug 35641 2018-08-01 15:32:56 +00:00
FormatTestComments.cpp clang-format: fix a crash in comment wraps. 2018-08-02 11:52:08 +00:00
FormatTestJS.cpp clang-format: [JS] don't break comments before any '{' 2018-08-03 13:58:33 +00:00
FormatTestJava.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00
FormatTestObjC.cpp [clang-format/ObjC] Put ObjC method arguments into one line when they fit 2018-07-09 07:08:45 +00:00
FormatTestProto.cpp [clang-format] Discourage breaks in submessage entries, hard rule 2018-06-12 17:26:31 +00:00
FormatTestRawStrings.cpp [clang-format] Do not format raw string literals inside a recognized function with a non-recognized delimiter 2018-06-28 16:58:24 +00:00
FormatTestSelective.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00
FormatTestTextProto.cpp [clang-format] Keep @message together in text protos 2018-06-25 12:43:12 +00:00
FormatTestUtils.h clang-format: Add preprocessor directive indentation 2017-08-30 14:34:57 +00:00
NamespaceEndCommentsFixerTest.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00
SortImportsTestJS.cpp clang-format: [JS] support default imports. 2017-08-01 15:54:43 +00:00
SortIncludesTest.cpp [clang-format] Move #include related style to libToolingCore 2018-05-14 19:51:33 +00:00
UsingDeclarationsSorterTest.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00