@@ -143,9 +143,9 @@ lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::Update() {
143
143
Function *destroy_func = ExtractDestroyFunction (target_sp, frame_ptr_addr);
144
144
CompilerType void_type = ast_ctx->GetBasicType (lldb::eBasicTypeVoid);
145
145
CompilerType promise_type;
146
- if (CompilerType template_argt =
146
+ if (CompilerType template_arg =
147
147
valobj_sp->GetCompilerType ().GetTypeTemplateArgument (0 ))
148
- promise_type = std::move (template_argt );
148
+ promise_type = std::move (template_arg );
149
149
if (promise_type.IsVoidType ()) {
150
150
// Try to infer the promise_type if it was type-erased
151
151
if (destroy_func) {
@@ -168,11 +168,11 @@ lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::Update() {
168
168
CompilerType coro_func_ptr_type = coro_func_type.GetPointerType ();
169
169
ValueObjectSP resume_ptr_sp = CreateValueObjectFromAddress (
170
170
" resume" , frame_ptr_addr + 0 * ptr_size, exe_ctx, coro_func_ptr_type);
171
- lldbassert (resume_ptr_sp);
171
+ assert (resume_ptr_sp);
172
172
m_children.push_back (std::move (resume_ptr_sp));
173
173
ValueObjectSP destroy_ptr_sp = CreateValueObjectFromAddress (
174
174
" destroy" , frame_ptr_addr + 1 * ptr_size, exe_ctx, coro_func_ptr_type);
175
- lldbassert (destroy_ptr_sp);
175
+ assert (destroy_ptr_sp);
176
176
m_children.push_back (std::move (destroy_ptr_sp));
177
177
178
178
// Add promise and coro_frame
@@ -196,10 +196,9 @@ lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::Update() {
196
196
llvm::Expected<size_t >
197
197
StdlibCoroutineHandleSyntheticFrontEnd::GetIndexOfChildWithName (
198
198
ConstString name) {
199
- for (size_t i = 0 , limit = m_children.size (); i < limit; ++i) {
200
- if (m_children[i]->GetName () == name) {
201
- return i;
202
- }
199
+ for (const auto &[idx, child_sp] : llvm::enumerate (m_children)) {
200
+ if (child_sp->GetName () == name)
201
+ return idx;
203
202
}
204
203
205
204
return llvm::createStringError (" Type has no child named '%s'" ,
0 commit comments