mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
C#: Deprecate get[L|R]Value predicates.
This commit is contained in:
@@ -24,7 +24,7 @@ class StringCat extends AddExpr {
|
||||
*/
|
||||
predicate isSelfConcatAssignExpr(AssignExpr e, Variable v) {
|
||||
exists(VariableAccess use |
|
||||
stringCatContains(e.getRValue(), use) and
|
||||
stringCatContains(e.getRightOperand(), use) and
|
||||
use.getTarget() = e.getTargetVariable() and
|
||||
v = use.getTarget()
|
||||
)
|
||||
@@ -41,7 +41,7 @@ predicate stringCatContains(StringCat expr, Expr child) {
|
||||
* where `v` is a simple variable (and not, for example, a property).
|
||||
*/
|
||||
predicate isConcatExpr(AssignAddExpr e, Variable v) {
|
||||
e.getLValue().getType() instanceof StringType and
|
||||
e.getLeftOperand().getType() instanceof StringType and
|
||||
v = e.getTargetVariable()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user