diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index f815f3ad7d415..e298d7fee4214 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -7188,8 +7188,7 @@ GetNthTemplateArgument(const clang::ClassTemplateSpecializationDecl *decl, // (including the ones preceding the parameter pack). const auto &pack = args[last_idx]; const size_t pack_idx = idx - last_idx; - const size_t pack_size = pack.pack_size(); - assert(pack_idx < pack_size && "parameter pack index out-of-bounds"); + assert(pack_idx < pack.pack_size() && "parameter pack index out-of-bounds"); return &pack.pack_elements()[pack_idx]; }