================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to