sdkrystian wrote:

I'm actually working on constraint checking for function template 
specializations in #88963. I don't think this patch is quite right... this will 
cause a crash if the befriended function is a member of a class template 
specialization. Relative to the changes in #88963, I believe the correct fix 
would be to change line 278 to:
```cpp
if (RelativeToPrimary &&
    (Function->getTemplateSpecializationKind() ==
         TSK_ExplicitSpecialization ||
     (Function->getFriendObjectKind() &&
      !Function->getPrimaryTemplate()->getFriendObjectKind())))
  return Response::UseNextDecl(Function);
```
I added a commit to #88963 which makes this change 
(be79079507ffbd9b29683498f405dc2c32dd8ba7)

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

Reply via email to