Skip to content

Commit 31a204a

Browse files
authored
Merge pull request #8174 from jketema/hinding-cleanup
C++: Simplify `cpp/declaration-hides-variable`
2 parents 58e0d54 + 423d325 commit 31a204a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cpp/ql/src/Best Practices/Hiding/DeclarationHidesVariable.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ where
1818
not lv1.isCompilerGenerated() and
1919
not lv2.isCompilerGenerated() and
2020
not lv1.getParentScope().(BlockStmt).isInMacroExpansion() and
21-
not lv2.getParentScope().(BlockStmt).isInMacroExpansion() and
22-
not lv1.getName() = "(unnamed local variable)"
21+
not lv2.getParentScope().(BlockStmt).isInMacroExpansion()
2322
select lv1, "Variable " + lv1.getName() + " hides another variable of the same name (on $@).", lv2,
2423
"line " + lv2.getLocation().getStartLine().toString()

0 commit comments

Comments
 (0)