Index: clang/lib/CodeGen/CGDebugInfo.cpp =================================================================== --- clang/lib/CodeGen/CGDebugInfo.cpp +++ clang/lib/CodeGen/CGDebugInfo.cpp @@ -1678,8 +1678,14 @@ SmallVector Elts; // First element is always return type. For 'void' functions it is NULL. QualType temp = Func->getReturnType(); - if (temp->getTypeClass() == Type::Auto && decl) - Elts.push_back(CreateType(cast(temp))); + if (temp->getTypeClass() == Type::Auto && decl) { + const AutoType *AT = cast(temp); + + if (AT->isDeduced() && ThisPtr->getPointeeCXXRecordDecl()->isLambda()) + Elts.push_back(getOrCreateType(AT->getDeducedType(),Unit)); + else + Elts.push_back(CreateType(AT)); + } else Elts.push_back(Args[0]);