File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -1083,6 +1083,8 @@ Bug Fixes to C++ Support
1083
1083
- Clang now diagnoses explicit object parameters in member pointers and other contexts where they should not appear.
1084
1084
Fixes (#GH85992).
1085
1085
- Fixed a crash-on-invalid bug involving extraneous template parameter with concept substitution. (#GH73885)
1086
+ - Fixed an assertion failure about a constraint of a friend function template references to a value with greater
1087
+ template depth than the friend function template. (#GH98258)
1086
1088
1087
1089
Bug Fixes to AST Handling
1088
1090
^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -1691,10 +1691,7 @@ class ConstraintRefersToContainingTemplateChecker
1691
1691
using inherited::TransformTemplateTypeParmType;
1692
1692
QualType TransformTemplateTypeParmType (TypeLocBuilder &TLB,
1693
1693
TemplateTypeParmTypeLoc TL, bool ) {
1694
- assert (TL.getDecl ()->getDepth () <= TemplateDepth &&
1695
- " Nothing should reference a value below the actual template depth, "
1696
- " depth is likely wrong" );
1697
- if (TL.getDecl ()->getDepth () != TemplateDepth)
1694
+ if (TL.getDecl ()->getDepth () < TemplateDepth)
1698
1695
Result = true ;
1699
1696
return inherited::TransformTemplateTypeParmType (
1700
1697
TLB, TL,
Original file line number Diff line number Diff line change @@ -504,3 +504,19 @@ template struct Z<int>;
504
504
Y y (1 );
505
505
506
506
}
507
+
508
+ namespace GH98258 {
509
+
510
+ struct S {
511
+ template <typename U>
512
+ friend void f () requires requires { []<typename V>(V){}; } {
513
+ return ;
514
+ }
515
+
516
+ template <typename U>
517
+ friend void f2 () requires requires { [](auto ){}; } {
518
+ return ;
519
+ }
520
+ };
521
+
522
+ }
You can’t perform that action at this time.
0 commit comments