mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Remove flow from getAttributeName
This commit is contained in:
@@ -137,12 +137,7 @@ private class SetAttrCallAsAttrWrite extends AttrWrite, CfgNode {
|
||||
override ExprNode getAttributeNameExpr() { result.asCfgNode() = node.getName() }
|
||||
|
||||
override string getAttributeName() {
|
||||
// TODO track this back using local flow
|
||||
exists(StrConst s, Node nodeFrom |
|
||||
s = nodeFrom.asExpr() and
|
||||
simpleLocalFlowStep*(nodeFrom, this.getAttributeNameExpr()) and
|
||||
result = s.getText()
|
||||
)
|
||||
result = this.getAttributeNameExpr().asExpr().(StrConst).getText()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,10 +215,6 @@ private class GetAttrCallAsAttrRead extends AttrRead, CfgNode {
|
||||
override ExprNode getAttributeNameExpr() { result.asCfgNode() = node.getName() }
|
||||
|
||||
override string getAttributeName() {
|
||||
exists(StrConst s, Node nodeFrom |
|
||||
s = nodeFrom.asExpr() and
|
||||
simpleLocalFlowStep*(nodeFrom, this.getAttributeNameExpr()) and
|
||||
result = s.getText()
|
||||
)
|
||||
result = this.getAttributeNameExpr().asExpr().(StrConst).getText()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user