[clang] [clang] fix a crash for uses of a pseudo-destructor of enum without definition (PR #210424)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 20 06:52:53 PDT 2026
================
@@ -41,7 +41,7 @@ static CXXRecordDecl *getCurrentInstantiationOf(QualType T,
DeclContext *Sema::computeDeclContext(QualType T) {
if (!T->isDependentType())
- if (auto *D = T->getAsTagDecl())
+ if (auto *D = T->getAsRecordDecl())
----------------
erichkeane wrote:
The question here was what it now falls back to, but yes, there is no 'current instantation of' enum, and now that I look closer (it spends more time looking at Tag type than is comforting :D), it'll return enum.
I have some MILD discomfort here, but not enough to hold up this patch/merge. so LGTM.
https://github.com/llvm/llvm-project/pull/210424
More information about the cfe-commits
mailing list