Skip to content

Commit c7bb436

Browse files
committed
Tidy up the move-from-last-use-for-locals leftover comment, closes #156
1 parent 4a7821f commit c7bb436

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

source/sema.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,13 +395,11 @@ class sema
395395
if (auto const* sym = std::get_if<symbol::active::declaration>(&s.sym)) {
396396
if (sym->start && sym->declaration->is(declaration_node::active::object) &&
397397
(!sym->parameter ||
398-
sym->parameter->pass == passing_style::copy ||
399-
sym->parameter->pass == passing_style::move ||
400-
sym->parameter->pass == passing_style::forward
401-
)
398+
sym->parameter->pass == passing_style::copy ||
399+
sym->parameter->pass == passing_style::move ||
400+
sym->parameter->pass == passing_style::forward
402401
)
403-
// TODO: Extend move-from-last-use to locals once we can reliably detect rvalue-friendly contexts
404-
//(!sym->parameter || sym->parameter->pass == passing_style::copy || sym->parameter->pass == passing_style::move))
402+
)
405403
{
406404
return sym;
407405
}

0 commit comments

Comments
 (0)