llvm-project/clang/lib/Format
Martin Probst af16c50639 clang-format: [JS] avoid indent after ambient function declarations.
Summary:
Before:
  declare function foo();
    let x = 1;

After:
  declare function foo();
  let x = 1;

The problem was that clang-format would unconditionally try to parse a child block, even though ambient function declarations do not have a body (similar to forward declarations).

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

llvm-svn: 290959
2017-01-04 13:36:43 +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 [clang-format] Add comment manipulation header 2016-10-19 08:19:46 +00:00
BreakableToken.h Roll-back r250822. 2015-10-20 13:23:58 +00:00
CMakeLists.txt [clang-format] Add comment manipulation header 2016-10-19 08:19:46 +00:00
Comments.cpp [clang-format] Add comment manipulation header 2016-10-19 08:19:46 +00:00
Comments.h [clang-format] Add comment manipulation header 2016-10-19 08:19:46 +00:00
ContinuationIndenter.cpp clang-format: Slightly tweak the behavior of <<-wrapping. 2016-12-19 11:14:23 +00:00
ContinuationIndenter.h Addressed reviewer's post-submission comments from http://reviews.llvm.org/D18551. 2016-04-28 07:52:03 +00:00
Encoding.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00
Format.cpp Change clang-format's Chromium JavaScript defaults 2017-01-04 02:33:36 +00:00
FormatToken.cpp clang-format: Fix bug in handling of single-column lists. 2016-12-21 17:02:06 +00:00
FormatToken.h clang-format: Keep string-literal-label + value pairs on a line. 2016-12-13 11:16:42 +00:00
FormatTokenLexer.cpp clang-format: Separate out a language kind for ObjC. 2016-12-12 12:42:29 +00:00
FormatTokenLexer.h clang-format: [JS] nested and tagged template strings. 2016-08-25 10:13:21 +00:00
SortJavaScriptImports.cpp Use after move bug fixes 2016-12-23 11:40:44 +00:00
SortJavaScriptImports.h clang-format: [JS] sort ES6 imports. 2016-05-20 11:24:24 +00:00
TokenAnalyzer.cpp Don't copy replacements in for-range loop. NFC. 2016-10-19 13:50:17 +00:00
TokenAnalyzer.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00
TokenAnnotator.cpp clang-format: Less eagerly try to keep label-value pairs on a line. 2016-12-22 12:37:06 +00:00
TokenAnnotator.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
UnwrappedLineFormatter.cpp [clang-format] Fixed line merging of more than two lines 2016-11-15 15:07:07 +00:00
UnwrappedLineFormatter.h [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
UnwrappedLineParser.cpp clang-format: [JS] avoid indent after ambient function declarations. 2017-01-04 13:36:43 +00:00
UnwrappedLineParser.h clang-format: [JS] Handle certain cases of ASI. 2016-03-14 19:21:36 +00:00
WhitespaceManager.cpp Use after move bug fixes 2016-12-23 11:40:44 +00:00
WhitespaceManager.h [Format] Remove dead code. 2016-12-19 21:10:50 +00:00