Skip to content

Commit c4e06b1

Browse files
committed
refactor(sema): rework some outdated whitespace
1 parent d27307b commit c4e06b1

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

source/sema.h

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -605,17 +605,15 @@ class sema
605605
if (auto const* sym = std::get_if<symbol::active::declaration>(&s.sym)) {
606606
if (
607607
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
615613
)
616614
)
617615
{
618-
// Must be in function or type scope
616+
// Must be in function scope
619617
if (
620618
sym->declaration->parent_declaration
621619
&& sym->declaration->parent_is_function()
@@ -649,7 +647,7 @@ class sema
649647
;
650648
}
651649

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,
653651
// identify and tag its definite last uses to `std::move` from them
654652
//
655653
if (auto decl = is_potentially_movable_local(symbols[sympos])) {
@@ -666,8 +664,8 @@ class sema
666664
}
667665

668666
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
671669
//
672670
auto find_definite_last_uses(
673671
token const* id,
@@ -764,7 +762,6 @@ class sema
764762

765763
// If we arrived back at the declaration without finding a use
766764
// and this isn't generated code (ignore that for now)
767-
// and this isn't in type scope
768765
// and this is a user-named object (not 'this', 'that', or '_')
769766
if (
770767
i == pos
@@ -1873,7 +1870,7 @@ class sema
18731870
expecting_ufcs_on_type_scope_variable = false;
18741871
}
18751872

1876-
// We currently only care to look at object identifiers
1873+
// We currently only care to look at variable identifiers
18771874
if (
18781875
t.type() != lexeme::Identifier
18791876
&& t != "this"
@@ -1916,7 +1913,7 @@ class sema
19161913
// or it's a 'copy' parameter (but to be a use it must be after
19171914
// the declaration, not the token in the decl's name itself)
19181915
// 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;
19201917
if (auto decl = get_declaration_of(t, look_up_to_type, look_up_to_type);
19211918
decl
19221919
&& decl->declaration->name() != &t

0 commit comments

Comments
 (0)