llvm-project/clang/lib/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
..
AffectedRangeManager.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
AffectedRangeManager.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
BreakableToken.cpp clang-format: [JS] don't break comments before any '{' 2018-08-03 13:58:33 +00:00
BreakableToken.h [clang-format] Silence -Wdocumentation warnings 2018-07-30 12:22:41 +00:00
CMakeLists.txt Reland "Move #include manipulation code to new lib/Tooling/Inclusions." 2018-06-04 09:04:12 +00:00
ContinuationIndenter.cpp [clang-format] Indent after breaking Javadoc annotated line 2018-07-30 08:45:45 +00:00
ContinuationIndenter.h Remove trailing space 2018-07-30 19:24:48 +00:00
Encoding.h NFC: Add the emacs c++ mode hint "-*- C++ -*-" to the headers that don't have it 2018-07-24 00:07:49 +00:00
Format.cpp [clang-format] Add some text proto functions to Google style 2018-08-01 12:35:23 +00:00
FormatInternal.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
FormatToken.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
FormatToken.h [clang-format/ObjC] Improve split priorities for ObjC methods 2018-07-09 06:54:52 +00:00
FormatTokenLexer.cpp [clang-format] Consider tok::hashhash in python-style comments 2018-06-07 09:46:24 +00:00
FormatTokenLexer.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
NamespaceEndCommentsFixer.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
NamespaceEndCommentsFixer.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
SortJavaScriptImports.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00
SortJavaScriptImports.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
TokenAnalyzer.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00
TokenAnalyzer.h Add SourceManagerForFile helper which sets up SourceManager and dependencies for a single file with code snippet 2018-05-09 21:35:52 +00:00
TokenAnnotator.cpp [clang-format/ObjC] Improve split priorities for ObjC methods 2018-07-09 06:54:52 +00:00
TokenAnnotator.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
UnwrappedLineFormatter.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00
UnwrappedLineFormatter.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
UnwrappedLineParser.cpp [clang-format] Fix end-of-file comments text proto formatting 2018-06-25 11:08:24 +00:00
UnwrappedLineParser.h [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in name 2018-05-30 15:21:38 +00:00
UsingDeclarationsSorter.cpp [clang] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:30:56 +00:00
UsingDeclarationsSorter.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
WhitespaceManager.cpp [Format] Fix for bug 35641 2018-08-01 15:32:56 +00:00
WhitespaceManager.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00