[clang] [clang][Sema] Unwrap reference types in HeuristicResolverImpl::resolveTypeToRecordDecl() (PR #124451)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 26 01:43:54 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();
----------------
zyn0217 wrote:
Does it work if `b` were a pointer?
https://github.com/llvm/llvm-project/pull/124451
More information about the cfe-commits
mailing list