aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Parser/lambda-misplaced-capture-default.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Parser/lambda-misplaced-capture-default.cpp')
-rw-r--r--clang/test/Parser/lambda-misplaced-capture-default.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Parser/lambda-misplaced-capture-default.cpp b/clang/test/Parser/lambda-misplaced-capture-default.cpp
index d65b875..4f5bd6d 100644
--- a/clang/test/Parser/lambda-misplaced-capture-default.cpp
+++ b/clang/test/Parser/lambda-misplaced-capture-default.cpp
@@ -36,3 +36,12 @@ template <typename... Args> void Test(Args... args) {
[... xs = &args, &] {}; // expected-error {{capture default must be first}}
}
} // namespace misplaced_capture_default_pack
+
+namespace GH163498 {
+struct S {
+ template <class T> S(T) {}
+};
+void t() {
+ S s{[a(42), &] {}}; // expected-error {{capture default must be first}}
+}
+}