forked from OSchip/llvm-project
clang-format: Fix incorrect lambda-detection.
Before: [ a, a ]() -> a<1>{}; After: [a, a]() -> a<1> {}; llvm-svn: 244890
This commit is contained in:
parent
a887f06214
commit
5eaa009e57
|
@ -1000,6 +1000,7 @@ bool UnwrappedLineParser::tryToParseLambda() {
|
|||
case tok::less:
|
||||
case tok::greater:
|
||||
case tok::identifier:
|
||||
case tok::numeric_constant:
|
||||
case tok::coloncolon:
|
||||
case tok::kw_mutable:
|
||||
nextToken();
|
||||
|
|
|
@ -10003,6 +10003,7 @@ TEST_F(FormatTest, FormatsLambdas) {
|
|||
verifyGoogleFormat("auto a = [&b, c](D* d) -> pair<D*, D*> {};");
|
||||
verifyGoogleFormat("auto a = [&b, c](D* d) -> D& {};");
|
||||
verifyGoogleFormat("auto a = [&b, c](D* d) -> const D* {};");
|
||||
verifyFormat("[a, a]() -> a<1> {};");
|
||||
verifyFormat("auto aaaaaaaa = [](int i, // break for some reason\n"
|
||||
" int j) -> int {\n"
|
||||
" return ffffffffffffffffffffffffffffffffffffffffffff(i * j);\n"
|
||||
|
|
Loading…
Reference in New Issue