diff options
author | Matheus Izvekov <mizvekov@gmail.com> | 2025-03-21 10:54:24 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-21 10:54:24 -0300 |
commit | 141656644959ea43b61868ef16e3d2782d40ea51 (patch) | |
tree | d6be138e2335bdf573b8872b2d46b4629bb30905 /clang/lib/Sema/SemaLookup.cpp | |
parent | ac9049df7e62e2ca4dc5d103593b51639b5715e3 (diff) | |
download | llvm-141656644959ea43b61868ef16e3d2782d40ea51.zip llvm-141656644959ea43b61868ef16e3d2782d40ea51.tar.gz llvm-141656644959ea43b61868ef16e3d2782d40ea51.tar.bz2 |
Reland: [clang] NFC: Clear some uses of MemberPointerType::getClass (#132317)
Relands Original PR: https://github.com/llvm/llvm-project/pull/131965
Addresses
https://github.com/llvm/llvm-project/pull/131965#issuecomment-2741619498
* Fixes isIncompleteType for injected classes
This clears up some uses of getClass on MemberPointerType when
equivalent uses of getMostRecentCXXRecordDecl would be just as simple or
simpler.
This is split-off from a larger patch which removes getClass, in order
to facilitate review.
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index aecf8ed..59dc6df 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -3210,11 +3210,8 @@ addAssociatedClassesAndNamespaces(AssociatedLookup &Result, QualType Ty) { // X. case Type::MemberPointer: { const MemberPointerType *MemberPtr = cast<MemberPointerType>(T); - - // Queue up the class type into which this points. - Queue.push_back(MemberPtr->getClass()); - - // And directly continue with the pointee type. + addAssociatedClassesAndNamespaces( + Result, MemberPtr->getMostRecentCXXRecordDecl()); T = MemberPtr->getPointeeType().getTypePtr(); continue; } |