================
@@ -249,9 +254,10 @@ static void 
visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path,
                                                   LocalVisitor Visit);
 
 template <typename T> static bool isRecordWithAttr(QualType Type) {
-  if (auto *RD = Type->getAsCXXRecordDecl())
-    return RD->hasAttr<T>();
-  return false;
+  CXXRecordDecl *RD = Type.getNonReferenceType()->getAsCXXRecordDecl();
----------------
Xazax-hun wrote:

I am a bit worried here. While `lifetime_capture_by` applies to the value 
behind the reference, `lifetimebound` always apply to the top level construct 
(so the reference itself). So I am wondering if this change is correct when we 
process a lifetimebound annotation. 

https://github.com/llvm/llvm-project/pull/115921
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to