Merge from master

This commit is contained in:
Dave Bartolomeo
2020-02-04 18:33:10 -07:00
66 changed files with 3896 additions and 849 deletions

View File

@@ -27,7 +27,8 @@ class DangerousExpression extends Expr {
e instanceof MethodCall
or
e instanceof ArrayAccess
)
) and
not exists(Expr e | this = e.getParent*() | e.(Call).getTarget().getAParameter().isOutOrRef())
}
}

View File

@@ -20,6 +20,9 @@ class Test
var b = true;
b &= c.Method(); // GOOD
b |= c[0]; // GOOD
if (c == null | c.Method(out _)) ; // GOOD
if (c == null | (c.Method() | c.Method(out _))) ; // GOOD
}
class C
@@ -28,6 +31,7 @@ class Test
public string Property { get; set; }
public bool this[int i] { get { return false; } set { } }
public bool Method() { return false; }
public bool Method(out int x) { x = 0; return false; }
}
}