[Lldb-commits] [lldb] [lldb][TypeSystem] Ensure that ParmVarDecls have the correct DeclContext (PR #124279)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 27 00:59:15 PST 2025
================
@@ -1414,11 +1412,15 @@ DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
LinkDeclContextToDIE(function_decl, die);
- if (!function_param_decls.empty()) {
- m_ast.SetFunctionParameters(function_decl, function_param_decls);
+ const clang::FunctionProtoType *function_prototype(
+ llvm::cast<clang::FunctionProtoType>(
+ ClangUtil::GetQualType(clang_type).getTypePtr()));
+ auto params = m_ast.CreateParameterDeclarations(function_decl,
+ *function_prototype);
+ if (!params.empty()) {
----------------
labath wrote:
Could we drop this check (call the function with an empty vector)?
https://github.com/llvm/llvm-project/pull/124279
More information about the lldb-commits
mailing list