simplify expressions that could be type-casts

This commit is contained in:
Erik Krogh Kristensen
2022-01-20 10:41:35 +01:00
parent 547f492be0
commit 4e8e3a7420
70 changed files with 123 additions and 143 deletions

View File

@@ -724,7 +724,7 @@ class SizeofOperator extends Expr, @runtime_sizeof {
* ```
*/
class SizeofExprOperator extends SizeofOperator {
SizeofExprOperator() { exists(Expr e | this.getChild(0) = e) }
SizeofExprOperator() { exists(this.getChild(0)) }
override string getAPrimaryQlClass() { result = "SizeofExprOperator" }
@@ -787,7 +787,7 @@ class AlignofOperator extends Expr, @runtime_alignof {
* ```
*/
class AlignofExprOperator extends AlignofOperator {
AlignofExprOperator() { exists(Expr e | this.getChild(0) = e) }
AlignofExprOperator() { exists(this.getChild(0)) }
/**
* Gets the contained expression.