remove redundant inline casts

This commit is contained in:
Erik Krogh Kristensen
2021-10-28 16:35:53 +02:00
parent d425b3782e
commit e75448ebb0
38 changed files with 60 additions and 79 deletions

View File

@@ -74,7 +74,7 @@ class AstCfgNode extends CfgNode, TElementNode {
override Location getLocation() { result = n.getLocation() }
final override string toString() {
exists(string s | s = n.(AstNode).toString() |
exists(string s | s = n.toString() |
result = "[" + this.getSplitsString() + "] " + s
or
not exists(this.getSplitsString()) and result = s

View File

@@ -132,7 +132,7 @@ private string getSetterCallAttributeName(AST::SetterMethodCall call) {
predicate basicLoadStep(Node nodeFrom, Node nodeTo, string content) {
exists(ExprNodes::MethodCallCfgNode call |
call.getExpr().getNumberOfArguments() = 0 and
content = call.getExpr().(AST::MethodCall).getMethodName() and
content = call.getExpr().getMethodName() and
nodeFrom.asExpr() = call.getReceiver() and
nodeTo.asExpr() = call
)