mizvekov planned changes to this revision.
mizvekov added inline comments.

================
Comment at: clang/lib/Sema/SemaOverload.cpp:14176
+      ParmVarDecl *Param = Method->getParamDecl(i);
+      if (!Param->hasDefaultArg()) {
+        IsError = true;
----------------
shafik wrote:
> Do we have a test for this case?
The test included hits it, but after a second look I realized this wasn't 
supposed to happen in the first place.
We are missing something else to make this fully work, I think we are not 
expanding across that nested function template.

Test case: https://godbolt.org/z/qq4rTfK9x
```
template <class...> struct S {
  template <int> auto f(decltype([](int...) {}()));
};
template struct S<>;
```
GCC compiles this, clang doesn't, because it thinks that lambda has 1 parameter.

I will take this patch out for changes, I probably won't have time to go back 
to it anytime soon because I have other patches with more priority.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128276/new/

https://reviews.llvm.org/D128276

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to