Index: source/Plugins/SymbolFile/PDB/PDBASTParser.cpp =================================================================== --- source/Plugins/SymbolFile/PDB/PDBASTParser.cpp +++ source/Plugins/SymbolFile/PDB/PDBASTParser.cpp @@ -141,7 +141,7 @@ } else if (auto func_sig = llvm::dyn_cast(&type)) { auto arg_enum = func_sig->getArguments(); uint32_t num_args = arg_enum->getChildCount(); - std::vector arg_list(num_args); + std::vector arg_list; while (auto arg = arg_enum->getNext()) { lldb_private::Type *arg_type = m_ast.GetSymbolFile()->ResolveTypeUID(arg->getSymIndexId()); @@ -152,6 +152,8 @@ CompilerType arg_ast_type = arg_type->GetFullCompilerType(); arg_list.push_back(arg_ast_type); } + lldbassert(arg_list.size() <= num_args); + auto pdb_return_type = func_sig->getReturnType(); lldb_private::Type *return_type = m_ast.GetSymbolFile()->ResolveTypeUID(pdb_return_type->getSymIndexId()); @@ -166,7 +168,7 @@ if (func_sig->isVolatileType()) type_quals |= clang::Qualifiers::Volatile; CompilerType func_sig_ast_type = m_ast.CreateFunctionType( - return_ast_type, &arg_list[0], num_args, false, type_quals); + return_ast_type, arg_list.data(), arg_list.size(), false, type_quals); return std::make_shared( func_sig->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(), 0,