================ @@ -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()) ---------------- antangelo wrote:
What do you think about this example, which exercises this issue in the above case? https://godbolt.org/z/Yz1WEqM7M If I switch from `isTemplated()` to `getDescribedTemplate()` to only check `CheckingRD` itself, then clang will accept that code. Otherwise, as the patch is now, the example is rejected. What should be the correct behavior? 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