llvm-project/clang/lib/Format
Martin Probst c160cfaf66 clang-format: [JS] do not collapse short classes.
Summary:
clang-format does not collapse short records, interfaces, unions, etc.,
but fails to do so if the record is preceded by certain modifiers
(export, default, abstract, declare). This change skips over all
modifiers, and thus handles all record definitions uniformly.

Before:
    export class Foo { bar: string; }
    class Baz {
      bam: string;
    }

After:
    export class Foo {
      bar: string;
    }
    class Baz {
      bam: string;
    }

Reviewers: djasper

Subscribers: klimek

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

llvm-svn: 318976
2017-11-25 09:35:33 +00:00
..
AffectedRangeManager.cpp Added Fixer implementation and fix() interface in clang-format for removing redundant code. 2016-04-25 15:09:22 +00:00
AffectedRangeManager.h removed redundant '#' 2016-04-28 07:52:06 +00:00
BreakableToken.cpp Implement more accurate penalty & trade-offs while breaking protruding tokens. 2017-11-17 11:17:15 +00:00
BreakableToken.h Implement more accurate penalty & trade-offs while breaking protruding tokens. 2017-11-17 11:17:15 +00:00
CMakeLists.txt [clang-format] Support sorting using declarations 2017-06-21 12:03:12 +00:00
ContinuationIndenter.cpp clang-format: remove trailing lines in lamdas and arrow functions. 2017-11-17 18:06:33 +00:00
ContinuationIndenter.h Refactor ContinuationIndenter's breakProtrudingToken logic. 2017-11-14 09:19:53 +00:00
Encoding.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00
Format.cpp [clang-format] Add text proto filename detection 2017-11-17 15:10:49 +00:00
FormatInternal.h FormatInternal.h: Add missing includes. 2017-11-21 01:09:17 +00:00
FormatToken.cpp clang-format clang-format. 2017-09-20 09:51:03 +00:00
FormatToken.h clang-format clang-format. 2017-09-20 09:51:03 +00:00
FormatTokenLexer.cpp [clang-format] Support python-style comments in text protos 2017-11-10 12:50:09 +00:00
FormatTokenLexer.h [clang-format] Support python-style comments in text protos 2017-11-10 12:50:09 +00:00
NamespaceEndCommentsFixer.cpp [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
NamespaceEndCommentsFixer.h [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
SortJavaScriptImports.cpp [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
SortJavaScriptImports.h clang-format: [JS] sort ES6 imports. 2016-05-20 11:24:24 +00:00
TokenAnalyzer.cpp [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
TokenAnalyzer.h [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
TokenAnnotator.cpp clang-format: [JS] handle `for` as object label. 2017-11-25 09:24:33 +00:00
TokenAnnotator.h [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
UnwrappedLineFormatter.cpp clang-format: [JS] do not collapse short classes. 2017-11-25 09:35:33 +00:00
UnwrappedLineFormatter.h [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
UnwrappedLineParser.cpp clang-format: [JS] handle semis in generic types. 2017-11-25 09:33:47 +00:00
UnwrappedLineParser.h [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
UsingDeclarationsSorter.cpp [clang-format] Deduplicate using declarations 2017-11-24 18:00:01 +00:00
UsingDeclarationsSorter.h [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
WhitespaceManager.cpp [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00
WhitespaceManager.h [clang-format] Format raw string literals 2017-10-30 14:01:50 +00:00