mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
Python: Reduce size of attrReadTracker
On pallets/flask, this reduced the number of tuples from 100866 results => 33060 results
This commit is contained in:
@@ -585,7 +585,11 @@ Function findFunctionAccordingToMroKnownStartingClass(Class startingClass, strin
|
||||
/** Gets a reference to the attribute read `attr` */
|
||||
private TypeTrackingNode attrReadTracker(TypeTracker t, AttrRead attr) {
|
||||
t.start() and
|
||||
result = attr
|
||||
result = attr and
|
||||
attr.getObject() in [
|
||||
classTracker(_), classInstanceTracker(_), selfTracker(_), clsTracker(_),
|
||||
superCallNoArgumentTracker(_), superCallTwoArgumentTracker(_, _)
|
||||
]
|
||||
or
|
||||
exists(TypeTracker t2 | result = attrReadTracker(t2, attr).track(t2, t))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user