[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-16 Thread Roy Jacobson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG68786f063275: [Sema] Fix friend destructor declarations after D130936 (authored by royjacobson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131541/new/

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-15 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. This LGTM; thanks! In D131541#3721383 , @royjacobson wrote: > I still don't diagnose the dependent friend case, but

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added reviewers: erichkeane, hubert.reinterpretcast, shafik. royjacobson added a comment. Updated the patch and added more test coverage. I still don't diagnose the dependent friend case, but I didn't see how to do it easily. Comment at:

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 452448. royjacobson added a comment. Add another test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131541/new/ https://reviews.llvm.org/D131541 Files: clang/lib/Sema/SemaDecl.cpp

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-13 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 452447. royjacobson added a comment. Update to handle some edge cases better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131541/new/ https://reviews.llvm.org/D131541 Files:

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-10 Thread Hubert Tong via Phabricator via cfe-commits
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();

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-10 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11518-11520 + // FIXME: We still don't diagnose on this case + // template + // struct A { friend T::S::~V(); }; There's nothing we can diagnose about this

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-10 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a subscriber: hubert.reinterpretcast. royjacobson added a comment. Hi @hubert.reinterpretcast, thanks for the quick catch! I have posted this initial patch, but it still misses the case template struct E { friend T::S::~V(); }; Something goes wrong there that I

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-10 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 451376. royjacobson added a comment. Don't regress on invalid (non-dependent) friend destructor declarations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131541/new/ https://reviews.llvm.org/D131541

[PATCH] D131541: [Sema] Fix friend destructor declarations after D130936

2022-08-09 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I accidentally broke friend destructor declarations in D130936 . Fix it by