@@ -85,30 +85,16 @@ class Expr extends Expr_, AstNode {
8585 /** Gets what this expression might "refer-to" in the given `context`.
8686 */
8787 predicate refersTo ( Context context , Object obj , ClassObject cls , AstNode origin ) {
88- exists ( Value value , ControlFlowNode cfgorigin |
89- PointsTo:: pointsTo ( this .getAFlowNode ( ) , context , value , cfgorigin ) and
90- origin .getAFlowNode ( ) = cfgorigin and
91- cls = value .getClass ( ) .getSource ( ) |
92- if exists ( value .getSource ( ) ) then
93- obj = value .getSource ( )
94- else
95- obj = cfgorigin
96- )
88+ this .getAFlowNode ( ) .refersTo ( context , obj , cls , origin .getAFlowNode ( ) )
9789 }
9890
9991 /** Whether this expression might "refer-to" to `value` which is from `origin`
10092 * Unlike `this.refersTo(value, _, origin)`, this predicate includes results
10193 * where the class cannot be inferred.
10294 */
95+ pragma [ nomagic]
10396 predicate refersTo ( Object obj , AstNode origin ) {
104- exists ( Value value , ControlFlowNode cfgorigin |
105- PointsTo:: pointsTo ( this .getAFlowNode ( ) , _, value , cfgorigin ) and
106- origin .getAFlowNode ( ) = cfgorigin and
107- if exists ( value .getSource ( ) ) then
108- obj = value .getSource ( )
109- else
110- obj = cfgorigin
111- )
97+ this .getAFlowNode ( ) .refersTo ( obj , origin .getAFlowNode ( ) )
11298 }
11399
114100 /** Equivalent to `this.refersTo(value, _)` */
0 commit comments