zyn0217 wrote:

Further reduced to:

```cpp
struct CacheRequestImpl {
  friend void LoadOrRun(CacheRequestImpl, int = 42) {}
};
void CacheRequestTests_MakesCacheKey_TestTestBody() {
  CacheRequestImpl req;
  LoadOrRun(req);
}
```

There is no template in this case, so obviously, 
`FDecl->getMemberSpecializationInfo()` would be null, hence the absence of the 
default arguments with this patch.

As I have 
[suggested](https://github.com/llvm/llvm-project/pull/113777#discussion_r1830858725)
 initially, we should probably put the checking in 
`Sema::InstantiateDefaultArgument()` because that is where the instantiation of 
default arguments in templates starts.

https://github.com/llvm/llvm-project/pull/113777
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to