]> granicus.if.org Git - clang/commit
clang-format: [JS] handle parenthesized class expressions.
authorMartin Probst <martin@probst.io>
Tue, 7 Feb 2017 14:05:30 +0000 (14:05 +0000)
committerMartin Probst <martin@probst.io>
Tue, 7 Feb 2017 14:05:30 +0000 (14:05 +0000)
commitae1b99494b1c2c8de6b6333a168bcb16022ed559
tree815525fca22e245a2b5d9a89a77c0cabb351f1cd
parent9630f7cdaa789146b10dd6816f1569a853f50cd4
clang-format: [JS] handle parenthesized class expressions.

Summary:
In JavaScript, classes are expressions, so they can appear e.g. in
argument lists.

    var C = foo(class {
      bar() {
        return 1;
      }
    };

Reviewers: djasper

Subscribers: cfe-commits, klimek

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294302 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/UnwrappedLineParser.cpp
lib/Format/UnwrappedLineParser.h
unittests/Format/FormatTestJS.cpp