mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Dataflow: Cache compatibleTypes.
This commit is contained in:
@@ -2483,7 +2483,7 @@ private predicate uselessTypebound(DataFlowType dt) {
|
||||
)
|
||||
}
|
||||
|
||||
pragma[inline]
|
||||
pragma[nomagic]
|
||||
private predicate compatibleTypesDelegateLeft(DataFlowType dt1, DataFlowType dt2) {
|
||||
exists(Gvn::GvnType t1, Gvn::GvnType t2 |
|
||||
t1 = exprNode(dt1.getADelegateCreation()).(NodeImpl).getDataFlowType().asGvnType() and
|
||||
@@ -2507,7 +2507,7 @@ private predicate compatibleTypesDelegateLeft(DataFlowType dt1, DataFlowType dt2
|
||||
* Holds if `t1` and `t2` are compatible, that is, whether data can flow from
|
||||
* a node of type `t1` to a node of type `t2`.
|
||||
*/
|
||||
pragma[inline]
|
||||
pragma[nomagic]
|
||||
predicate compatibleTypes(DataFlowType dt1, DataFlowType dt2) {
|
||||
exists(Gvn::GvnType t1, Gvn::GvnType t2 |
|
||||
t1 = dt1.asGvnType() and
|
||||
|
||||
Reference in New Issue
Block a user