================
@@ -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:

So this might not be the 'right' thing here.  "isTemplated" doesn't mean "this 
is a template", it means "this, or something that contains it is a template".

So:

```
template <typename T>
struct Parent {
   struct Child {
    };
};
```

In this case, `Parent` is a class template, but `Child` is still `isTemplated`. 
 

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

Reply via email to