clang-format: [JS] do not break in ArrayType[].
authorMartin Probst <martin@probst.io>
Fri, 24 Nov 2017 17:05:56 +0000 (17:05 +0000)
committerMartin Probst <martin@probst.io>
Fri, 24 Nov 2017 17:05:56 +0000 (17:05 +0000)
commitce2bd4dfd8d56512acd9f4c79f2894703e5977f1
treec29320fe598d43efd1420d69003cab87819ed165
parenta5968aad3da0407ff7aaae3a47f665ea7daac709
clang-format: [JS] do not break in ArrayType[].

Summary:
Wrapping between the type name and the array type indicator creates
invalid syntax in TypeScript.

Before:
    const xIsALongIdent:
        YJustBarelyFitsLinex
            [];  // illegal syntax.

After:
    const xIsALongIdent:
        YJustBarelyFitsLinex[];

Reviewers: djasper

Subscribers: klimek

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

llvm-svn: 318959
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestJS.cpp