Skip to content
Commit 9f0a4e50 authored by Manuel Klimek's avatar Manuel Klimek
Browse files

Fix formatting of lambda introducers with initializers.

Most of the work was already done when we introduced a look-behind based
lambda introducer detection.

This patch finishes the transition by completely relying on the simple
lambda introducer detection and simply recursing into normal
brace-parsing code to parse until the end of the introducer.

This fixes initializers in lambdas, including nested lambdas.

Before:
  auto a = [b = [c = 42]{}]{};
  auto b = [c = &i + 23]{};

After:
  auto a = [b = [c = 42] {}] {};
  auto b = [c = &i + 23] {};

llvm-svn: 313622
parent 072a43b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment