================
@@ -3780,6 +3780,30 @@ static void handleCleanupAttr(Sema &S, Decl *D, const 
ParsedAttr &AL) {
       << NI.getName() << ParamTy << Ty;
     return;
   }
+  VarDecl *VD = cast<VarDecl>(D);
+  // Create a reference to the variable declaration. This is a fake/dummy
+  // reference.
+  DeclRefExpr *VariableReference = DeclRefExpr::Create(
+      S.Context, NestedNameSpecifierLoc{}, SourceLocation{Loc}, VD, false,
----------------
erichkeane wrote:

Also note, Loc is the location of the attribute itself, and is probably not 
what you want to make the location here.  I would THINK we want the diagnostic 
to point to the function instead... WDYT?

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

Reply via email to