Skip to content

Commit 5541a75

Browse files
committed
feat(sema): diagnose unused variables in generate code
1 parent 53bb617 commit 5541a75

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

source/sema.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,11 +761,9 @@ class sema
761761
}
762762

763763
// If we arrived back at the declaration without finding a use
764-
// and this isn't generated code (ignore that for now)
765764
// and this is a user-named object (not 'this', 'that', or '_')
766765
if (
767766
i == pos
768-
&& id->position().lineno > 0
769767
&& *id != "this"
770768
&& *id != "that"
771769
&& *id != "_"

0 commit comments

Comments
 (0)