summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp1
-rw-r--r--clang/unittests/Format/FormatTest.cpp2
2 files changed, 3 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:
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 0f7e0cd5b28..99b2beadc4a 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -11725,6 +11725,8 @@ TEST_F(FormatTest, FormatsWithWebKitStyle) {
TEST_F(FormatTest, FormatsLambdas) {
verifyFormat("int c = [b]() mutable { return [&b] { return b++; }(); }();\n");
+ verifyFormat(
+ "int c = [b]() mutable noexcept { return [&b] { return b++; }(); }();\n");
verifyFormat("int c = [&] { [=] { return b++; }(); }();\n");
verifyFormat("int c = [&, &a, a] { [=, c, &d] { return b++; }(); }();\n");
verifyFormat("int c = [&a, &a, a] { [=, a, b, &c] { return b++; }(); }();\n");
OpenPOWER on IntegriCloud