C#: Remove false positives for cs/useless-assignment-to-local

This commit is contained in:
Tom Hvitved
2020-02-05 20:03:50 +01:00
parent d9f9fc510f
commit 85e6b24c49
2 changed files with 1 additions and 3 deletions

View File

@@ -114,7 +114,7 @@ class RelevantDefinition extends AssignableDefinition {
*/
private predicate isDefaultLikeInitializer() {
this.isInitializer() and
exists(Expr e | e = this.getSource() |
exists(Expr e | e = this.getSource().stripCasts() |
exists(string val | val = e.getValue() |
val = "0" or
val = "-1" or