From 697093c959e4106ae4da67f7a7db678e3bcaebe8 Mon Sep 17 00:00:00 2001 From: MacroModel <33865334+MacroModel@users.noreply.github.com> Date: Tue, 15 Apr 2025 00:38:58 +0800 Subject: [PATCH] Update CGDecl.cpp --- clang/lib/CodeGen/CGDecl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index db8dbf86eca4f..e38a5f44d56d2 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -1466,7 +1466,10 @@ CodeGenFunction::EmitAutoVarAlloca(const VarDecl &D) { (Ty.getAddressSpace() == LangAS::opencl_private && getLangOpts().OpenCL)); AutoVarEmission emission(D); - + + if (Ty->isDependentType()) + return emission; + bool isEscapingByRef = D.isEscapingByref(); emission.IsEscapingByRef = isEscapingByRef;