Author: Michael Buch Date: 2025-01-27T16:15:30Z New Revision: 5f5cdf40382f06a8c417c42ec591f97aa76eeb67
URL: https://github.com/llvm/llvm-project/commit/5f5cdf40382f06a8c417c42ec591f97aa76eeb67 DIFF: https://github.com/llvm/llvm-project/commit/5f5cdf40382f06a8c417c42ec591f97aa76eeb67.diff LOG: [lldb][TypeSystemClang] CreateParameterDeclarations: don't specify SmallVector size This was causing Ubuntu buildbot failures: ``` /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp: In member function ‘llvm::SmallVector<clang::ParmVarDecl*> lldb_private::TypeSystemClang::CreateParameterDeclarations(clang::FunctionDecl*, const clang::FunctionProtoType&, const llvm::SmallVector<llvm::StringRef>&)’: /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:7728:10: error: could not convert ‘params’ from ‘SmallVector<[...],12>’ to ‘SmallVector<[...],6>’ 7728 | return params; | ^~~~~~ | | | SmallVector<[...],12> ``` It's unclear why 12 was chosen here. Given we don't set the size in other places where we parse parameters, this patch just removes the constant. Added: Modified: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index fc3dbfa311c9b8..cb246fde976c2f 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -7710,7 +7710,7 @@ TypeSystemClang::CreateParameterDeclarations( assert(parameter_names.empty() || parameter_names.size() == prototype.getNumParams()); - llvm::SmallVector<clang::ParmVarDecl *, 12> params; + llvm::SmallVector<clang::ParmVarDecl *> params; for (unsigned param_index = 0; param_index < prototype.getNumParams(); ++param_index) { llvm::StringRef name = _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits