@@ -498,7 +498,7 @@ class GuardedExpr extends AccessOrCallExpr {
498498 * left-most qualifier, then so must the other (accessing the same SSA
499499 * variable).
500500 */
501- Expr getAGuard ( Expr sub , AbstractValue v ) {
501+ Guard getAGuard ( Expr sub , AbstractValue v ) {
502502 result = g and
503503 sub = sub0 and
504504 v = v0
@@ -509,7 +509,7 @@ class GuardedExpr extends AccessOrCallExpr {
509509 * expression is guarded by a structurally equal expression having abstract
510510 * value `v`.
511511 */
512- predicate mustHaveValue ( AbstractValue v ) { exists ( Expr e | e = this .getAGuard ( e , v ) ) }
512+ predicate mustHaveValue ( AbstractValue v ) { g = this .getAGuard ( g , v ) }
513513
514514 /**
515515 * Holds if this expression is guarded by expression `cond`, which must
@@ -563,7 +563,7 @@ class GuardedControlFlowNode extends ControlFlow::Nodes::ElementNode {
563563 * left-most qualifier, then so must the other (accessing the same SSA
564564 * variable).
565565 */
566- Expr getAGuard ( Expr sub , AbstractValue v ) {
566+ Guard getAGuard ( Expr sub , AbstractValue v ) {
567567 result = g and
568568 sub = sub0 and
569569 v = v0
@@ -574,12 +574,10 @@ class GuardedControlFlowNode extends ControlFlow::Nodes::ElementNode {
574574 * control flow node is guarded by a structurally equal expression having
575575 * abstract value `v`.
576576 */
577- predicate mustHaveValue ( AbstractValue v ) { exists ( Expr e | e = this .getAGuard ( e , v ) ) }
577+ predicate mustHaveValue ( AbstractValue v ) { g = this .getAGuard ( g , v ) }
578578}
579579
580580/**
581- * DEPRECATED: Use `DataFlow::BarrierGuard` instead.
582- *
583581 * A guarded data flow node. A guarded data flow node is like a guarded expression
584582 * (`GuardedExpr`), except control flow graph splitting is taken into account. That
585583 * is, one data flow node belonging to an expression may be guarded, while another
@@ -597,7 +595,7 @@ class GuardedControlFlowNode extends ControlFlow::Nodes::ElementNode {
597595 * In the example above, the node for `x.ToString()` is null-guarded in the
598596 * split `b == true`, but not in the split `b == false`.
599597 */
600- deprecated class GuardedDataFlowNode extends DataFlow:: ExprNode {
598+ class GuardedDataFlowNode extends DataFlow:: ExprNode {
601599 private Guard g ;
602600
603601 private AccessOrCallExpr sub0 ;
@@ -621,7 +619,7 @@ deprecated class GuardedDataFlowNode extends DataFlow::ExprNode {
621619 * left-most qualifier, then so must the other (accessing the same SSA
622620 * variable).
623621 */
624- Expr getAGuard ( Expr sub , AbstractValue v ) {
622+ Guard getAGuard ( Expr sub , AbstractValue v ) {
625623 result = g and
626624 sub = sub0 and
627625 v = v0
@@ -632,20 +630,16 @@ deprecated class GuardedDataFlowNode extends DataFlow::ExprNode {
632630 * data flow node is guarded by a structurally equal expression having
633631 * abstract value `v`.
634632 */
635- predicate mustHaveValue ( AbstractValue v ) { exists ( Expr e | e = this .getAGuard ( e , v ) ) }
633+ predicate mustHaveValue ( AbstractValue v ) { g = this .getAGuard ( g , v ) }
636634}
637635
638636/** An expression guarded by a `null` check. */
639637class NullGuardedExpr extends GuardedExpr {
640638 NullGuardedExpr ( ) { this .mustHaveValue ( any ( NullValue v | not v .isNull ( ) ) ) }
641639}
642640
643- /**
644- * DEPRECATED: Use `DataFlow::BarrierGuard` instead.
645- *
646- * A data flow node guarded by a `null` check.
647- */
648- deprecated class NullGuardedDataFlowNode extends GuardedDataFlowNode {
641+ /** A data flow node guarded by a `null` check. */
642+ class NullGuardedDataFlowNode extends GuardedDataFlowNode {
649643 NullGuardedDataFlowNode ( ) { this .mustHaveValue ( any ( NullValue v | not v .isNull ( ) ) ) }
650644}
651645
0 commit comments