C#: Deprecate get[L|R]Value predicates.

This commit is contained in:
Michael Nebel
2026-03-27 12:49:03 +01:00
parent 43d002e6b5
commit 9c095bc580
81 changed files with 216 additions and 195 deletions

View File

@@ -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()
}