Skip to content

Commit 5f5cdf4

Browse files
committed
[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.
1 parent 09a29fc commit 5f5cdf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7710,7 +7710,7 @@ TypeSystemClang::CreateParameterDeclarations(
77107710
assert(parameter_names.empty() ||
77117711
parameter_names.size() == prototype.getNumParams());
77127712

7713-
llvm::SmallVector<clang::ParmVarDecl *, 12> params;
7713+
llvm::SmallVector<clang::ParmVarDecl *> params;
77147714
for (unsigned param_index = 0; param_index < prototype.getNumParams();
77157715
++param_index) {
77167716
llvm::StringRef name =

0 commit comments

Comments
 (0)