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;