Skip to content

Commit ecbbcc2

Browse files
authored
Merge pull request github#4066 from Marcono1234/marcono1234/simplify-VarAccess-isLValue
[Java] Simplify VarAccess.isLValue()
2 parents 6c60589 + cca2d9d commit ecbbcc2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

java/ql/src/semmle/code/java/Expr.qll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,10 +1344,7 @@ class VarAccess extends Expr, @varaccess {
13441344
*/
13451345
predicate isLValue() {
13461346
exists(Assignment a | a.getDest() = this) or
1347-
exists(PreIncExpr e | e.getExpr() = this) or
1348-
exists(PreDecExpr e | e.getExpr() = this) or
1349-
exists(PostIncExpr e | e.getExpr() = this) or
1350-
exists(PostDecExpr e | e.getExpr() = this)
1347+
exists(UnaryAssignExpr e | e.getExpr() = this)
13511348
}
13521349

13531350
/**

0 commit comments

Comments
 (0)