hubert.reinterpretcast added inline comments.

================
Comment at: clang/lib/Sema/SemaDecl.cpp:11522
+      if (NewFD->getFriendObjectKind() == Decl::FriendObjectKind::FOK_None ||
+          !NewFD->isDependentContext()) {
+        QualType ClassType = Destructor->getThisObjectType();
----------------
This condition appears to be true even when the friend itself is not dependent. 
The error message changes for:
```
struct C;
struct B { ~B(); };
template <typename T>
struct A {
  friend B::~C();
};
```

(causing the template and non-template cases to generate different messages).



================
Comment at: clang/test/SemaCXX/member-class-11.cpp:36-40
+// FIXME: We should diagnose here.
+template <typename T>
+struct E {
+  friend T::S::~V();
+};
----------------
Please replace this with the case where there is an instantiation. Also, the 
prior change to the release notes in https://reviews.llvm.org/D130936 should be 
adjusted to reflect the new scope of what is fixed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131541/new/

https://reviews.llvm.org/D131541

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to