This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix line parsing for noexcept lambdas
ClosedPublic

Authored by hultman on Jan 18 2019, 7:47 AM.

Details

Summary

$ echo "int c = [b]() mutable noexcept { return [&b] { return b++; }(); }();" |clang-format

int c = [b]() mutable noexcept {
  return [&b] { return b++; }();
}
();

with patch:

$ echo "int c = [b]() mutable noexcept { return [&b] { return b++; }(); }();" |bin/clang-format

int c = [b]() mutable noexcept { return [&b] { return b++; }(); }();

Diff Detail

Repository
rL LLVM

Event Timeline

hultman created this revision.Jan 18 2019, 7:47 AM
benhamilton accepted this revision.Jan 23 2019, 9:33 AM
This revision is now accepted and ready to land.Jan 23 2019, 9:33 AM

@benhamilton Would you mind landing the patch?

This revision was automatically updated to reflect the committed changes.

So sorry for the delay. I've landed this diff as rC352622.