diff options
author | Ben Hamilton <benhamilton@google.com> | 2019-01-30 13:54:32 +0000 |
---|---|---|
committer | Ben Hamilton <benhamilton@google.com> | 2019-01-30 13:54:32 +0000 |
commit | 4e442bb875132bef9f07290ae6d25810dc7c1107 (patch) | |
tree | 03147cdb8c5fd9a463af43c00f215f487f680881 /clang/lib/Format/UnwrappedLineParser.cpp | |
parent | 365021cc1562b973159bda7ffc923c373c310ec2 (diff) | |
download | bcm5719-llvm-4e442bb875132bef9f07290ae6d25810dc7c1107.tar.gz bcm5719-llvm-4e442bb875132bef9f07290ae6d25810dc7c1107.zip |
[clang-format] Fix line parsing for noexcept lambdas
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++; }(); }();
```
Contributed by hultman.
Reviewers: benhamilton, jolesiak, klimek, Wizard
Reviewed By: benhamilton
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D56909
llvm-svn: 352622
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 636e2e1c57c..f6727fcfa97 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1422,6 +1422,7 @@ bool UnwrappedLineParser::tryToParseLambda() { case tok::numeric_constant: case tok::coloncolon: case tok::kw_mutable: + case tok::kw_noexcept: nextToken(); break; case tok::arrow: |