================
@@ -40,3 +40,9 @@ struct U {
void i(int x = ) {} // expected-error{{expected expression}}
typedef int *fp(int x = ); // expected-error{{default arguments can only be
specified for parameters in a function declaration}}
};
+
+namespace {
+void f<>(int = []{;}) {} // expected-error{{no viable conversion from}} \
----------------
zyn0217 wrote:
```suggestion
namespace GH196725 {
void f<>(int = []{;}) {} // expected-error{{no viable conversion from}} \
```
Hum, can you please check if there's a bug with a valid example? If so I think
we'd better add the valid example to the test for clarity.
```cpp
template <class>
void f(int = []{;}) {}
```
https://github.com/llvm/llvm-project/pull/196788
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits