clang-format: remove trailing lines in lamdas and arrow functions.

Summary:
clang-format already removes empty lines at the beginning & end of
blocks:

    int x() {

      foo();  // lines before and after will be removed.

    }

However because lamdas and arrow functions are parsed as expressions,
the existing logic to remove empty lines in UnwrappedLineFormatter
doesn't handle them.

This change special cases arrow functions in ContinuationIndenter to
remove empty lines:

    x = []() {

      foo();  // lines before and after will now be removed.

    };

Reviewers: djasper

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318537 91177308-0d34-0410-b5e6-96231b3b80d8
4 files changed