[clang] [clang][Sema] Handle pointer and reference type more robustly in HeuristicResolver::resolveMemberExpr() (PR #124451)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 13:15:53 PST 2025
================
@@ -133,8 +133,8 @@ TemplateName getReferencedTemplateName(const Type *T) {
CXXRecordDecl *HeuristicResolverImpl::resolveTypeToRecordDecl(const Type *T) {
assert(T);
- // Unwrap type sugar such as type aliases.
- T = T->getCanonicalTypeInternal().getTypePtr();
+ // Unwrap references and type sugar such as type aliases.
+ T = T->getCanonicalTypeInternal().getNonReferenceType().getTypePtr();
----------------
HighCommander4 wrote:
In the revised version of the patch, we handle both reference and pointer types and we do it more robustly, checking for them after each step of simplification of the type.
https://github.com/llvm/llvm-project/pull/124451
More information about the cfe-commits
mailing list