File tree Expand file tree Collapse file tree
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1308,6 +1308,22 @@ module DataFlow {
13081308 nd = TFunctionReturnNode ( function )
13091309 }
13101310
1311+ /**
1312+ * INTERNAL: Do not use outside standard library.
1313+ *
1314+ * Gets a data flow node unique to the given field declaration.
1315+ *
1316+ * Note that this node defaults to being disconnected from the data flow
1317+ * graph, as the individual property reads and writes affecting the field are
1318+ * analyzed independently of the field declaration.
1319+ *
1320+ * Certain framework models may need this node to model the behavior of
1321+ * class and field decorators.
1322+ */
1323+ DataFlow:: Node fieldDeclarationNode ( FieldDeclaration field ) {
1324+ result = TPropNode ( field )
1325+ }
1326+
13111327 /**
13121328 * Gets the data flow node corresponding the given l-value expression, if
13131329 * such a node exists.
Original file line number Diff line number Diff line change @@ -293,7 +293,7 @@ module Angular2 {
293293 exists ( FieldDeclaration f |
294294 f .getName ( ) = name and
295295 f .getDeclaringClass ( ) .flow ( ) = this and
296- result = f . getNameExpr ( ) . flow ( )
296+ result = DataFlow :: fieldDeclarationNode ( f )
297297 )
298298 }
299299
You can’t perform that action at this time.
0 commit comments