================
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s
+
+struct S {};
+enum E { e1, e2 };
+
+template<typename T>
+auto foo(E = ({ ; }) ? 0 : 1, E = e2) { // expected-error {{default argument
may not use a GNU statement expression}}
+ return 42;
+}
+
+static_assert(foo<S>(e1) == 42, ""); // expected-error {{no matching function
for call to 'foo'}}
----------------
mizvekov wrote:
Missing newline at end of file.
https://github.com/llvm/llvm-project/pull/208868
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits