@@ -605,17 +605,15 @@ class sema
605
605
if (auto const * sym = std::get_if<symbol::active::declaration>(&s.sym )) {
606
606
if (
607
607
sym->start
608
- && (
609
- sym->declaration ->is_object ()
610
- && (!sym->parameter
611
- || sym->parameter ->pass == passing_style::copy
612
- || sym->parameter ->pass == passing_style::move
613
- || sym->parameter ->pass == passing_style::forward
614
- )
608
+ && sym->declaration ->is_object ()
609
+ && (!sym->parameter
610
+ || sym->parameter ->pass == passing_style::copy
611
+ || sym->parameter ->pass == passing_style::move
612
+ || sym->parameter ->pass == passing_style::forward
615
613
)
616
614
)
617
615
{
618
- // Must be in function or type scope
616
+ // Must be in function scope
619
617
if (
620
618
sym->declaration ->parent_declaration
621
619
&& sym->declaration ->parent_is_function ()
@@ -649,7 +647,7 @@ class sema
649
647
;
650
648
}
651
649
652
- // If this is a copy, move, or forward parameter or a local or type-scope variable,
650
+ // If this is a copy, move, or forward parameter or a local variable,
653
651
// identify and tag its definite last uses to `std::move` from them
654
652
//
655
653
if (auto decl = is_potentially_movable_local (symbols[sympos])) {
@@ -666,8 +664,8 @@ class sema
666
664
}
667
665
668
666
private:
669
- // Find the definite last uses for local or type-scope variable *id
670
- // starting at the given position and depth in the symbol/scope table
667
+ // Find the definite last uses for local *id starting at the
668
+ // given position and depth in the symbol/scope table
671
669
//
672
670
auto find_definite_last_uses (
673
671
token const * id,
@@ -764,7 +762,6 @@ class sema
764
762
765
763
// If we arrived back at the declaration without finding a use
766
764
// and this isn't generated code (ignore that for now)
767
- // and this isn't in type scope
768
765
// and this is a user-named object (not 'this', 'that', or '_')
769
766
if (
770
767
i == pos
@@ -1873,7 +1870,7 @@ class sema
1873
1870
expecting_ufcs_on_type_scope_variable = false ;
1874
1871
}
1875
1872
1876
- // We currently only care to look at object identifiers
1873
+ // We currently only care to look at variable identifiers
1877
1874
if (
1878
1875
t.type () != lexeme::Identifier
1879
1876
&& t != " this"
@@ -1916,7 +1913,7 @@ class sema
1916
1913
// or it's a 'copy' parameter (but to be a use it must be after
1917
1914
// the declaration, not the token in the decl's name itself)
1918
1915
// or it's a type-scope variable in a member function.
1919
- auto look_up_to_type = !started_this_member_access;
1916
+ auto look_up_to_type = !started_this_member_access;
1920
1917
if (auto decl = get_declaration_of (t, look_up_to_type, look_up_to_type);
1921
1918
decl
1922
1919
&& decl->declaration ->name () != &t
0 commit comments