================ @@ -1714,6 +1714,8 @@ class ConstraintRefersToContainingTemplateChecker // Friend, likely because it was referred to without its template arguments. void CheckIfContainingRecord(const CXXRecordDecl *CheckingRD) { CheckingRD = CheckingRD->getMostRecentDecl(); + if (!CheckingRD->isTemplated()) ---------------- erichkeane wrote:
Hmm... I THINK that should be rejected, since you can't name `Child` without naming `Parent`? But I don't think the standard is explicit about that. So perhaps `isTemplated` is what we want here. I didn't think it too far through when making the comment, but I'm glad you put together a good example. https://github.com/llvm/llvm-project/pull/74265 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits