1+ /**
2+ * Experimental library for reasoning about data flow.
3+ *
4+ * Current limitations:
5+ * - Global flow does not reason about subclassing, overriding, and dispatch
6+ * - `this`, `result`, and local field variables are treated less precisely
7+ * than regular variables (see VarScoping.qll)
8+ * - Polarity is not tracked, that is, global flow does not care about negation at all.
9+ */
10+
111private import codeql_ql.ast.Ast
212private import internal.NodesInternal
313private import internal.DataFlowNumbering
@@ -15,8 +25,10 @@ private import internal.GlobalFlow as GlobalFlow
1525 * To reason about global data flow, use `SuperNode.track()`.
1626 */
1727class Node extends TNode {
28+ /** Gets a string representation of this element. */
1829 string toString ( ) { none ( ) } // overridden in subclasses
1930
31+ /** Gets the location of element. */
2032 Location getLocation ( ) { none ( ) } // overridden in subclasses
2133
2234 /**
@@ -158,8 +170,10 @@ class FieldNode extends Node, MkFieldNode {
158170 /** Gets the member predicate or charpred for which this node represents access to the field. */
159171 Predicate getPredicate ( ) { result = pred }
160172
173+ /** Gets the declaration of the field. */
161174 FieldDecl getFieldDeclaration ( ) { result = fieldDecl }
162175
176+ /** Gets the name of the field. */
163177 string getFieldName ( ) { result = fieldDecl .getName ( ) }
164178
165179 override string toString ( ) { result = "'" + this .getFieldName ( ) + "' in " + pred .getName ( ) }
0 commit comments