@@ -36,7 +36,7 @@ module DataFlow {
3636 } or
3737 TThisNode ( StmtContainer f ) { f .( Function ) .getThisBinder ( ) = f or f instanceof TopLevel } or
3838 TUnusedParameterNode ( SimpleParameter p ) {
39- not exists ( SsaExplicitDefinition ssa | p = ssa . getDef ( ) )
39+ not exists ( SSA :: definition ( p ) )
4040 } or
4141 TDestructuredModuleImportNode ( ImportDeclaration decl ) {
4242 exists ( decl .getASpecifier ( ) .getImportedName ( ) )
@@ -718,10 +718,7 @@ module DataFlow {
718718 ImportSpecifierAsPropRead ( ) {
719719 spec = imprt .getASpecifier ( ) and
720720 exists ( spec .getImportedName ( ) ) and
721- exists ( SsaExplicitDefinition ssa |
722- ssa .getDef ( ) = spec and
723- this = TSsaDefNode ( ssa )
724- )
721+ this = ssaDefinitionNode ( SSA:: definition ( spec ) )
725722 }
726723
727724 override Node getBase ( ) { result = TDestructuredModuleImportNode ( imprt ) }
@@ -980,6 +977,11 @@ module DataFlow {
980977 */
981978 ValueNode valueNode ( ASTNode nd ) { result .getAstNode ( ) = nd }
982979
980+ /**
981+ * Gets the data flow node corresponding to `e`.
982+ */
983+ ExprNode exprNode ( Expr e ) { result = valueNode ( e ) }
984+
983985 /** Gets the data flow node corresponding to `ssa`. */
984986 SsaDefinitionNode ssaDefinitionNode ( SsaDefinition ssa ) { result = TSsaDefNode ( ssa ) }
985987
@@ -990,11 +992,7 @@ module DataFlow {
990992 * INTERNAL: Use `parameterNode(Parameter)` instead.
991993 */
992994 predicate parameterNode ( DataFlow:: Node nd , Parameter p ) {
993- exists ( SsaExplicitDefinition ssa |
994- nd = ssaDefinitionNode ( ssa ) and
995- p = ssa .getDef ( ) and
996- p instanceof SimpleParameter
997- )
995+ nd = ssaDefinitionNode ( SSA:: definition ( ( SimpleParameter ) p ) )
998996 or
999997 nd = TDestructuringPatternNode ( p )
1000998 or
0 commit comments