Skip to content

Commit b07c7ab

Browse files
committed
Python: Clear up attribute name access QLDoc
1 parent 60eec7b commit b07c7ab

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

python/ql/src/experimental/dataflow/internal/Attributes.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ abstract class AttrRef extends Node {
2222
*/
2323
abstract ExprNode getAttributeNameExpr();
2424

25-
/** Holds if this attribute reference may access an attribute named `attrName`. */
25+
/**
26+
* Holds if this attribute reference may access an attribute named `attrName`.
27+
* Uses local data flow to track potential attribute names, which may lead to imprecision. If more
28+
* precision is needed, consider using `getAttributeName` instead.
29+
*/
2630
predicate mayHaveAttributeName(string attrName) {
2731
attrName = this.getAttributeName()
2832
or
@@ -32,7 +36,11 @@ abstract class AttrRef extends Node {
3236
)
3337
}
3438

35-
/** Gets the name of the attribute being read or written, if it can be determined statically. */
39+
/**
40+
* Gets the name of the attribute being read or written. Only holds if the attribute name has
41+
* been uniquely determined statically. For attributes that are computed dynamically,
42+
* consider using `mayHaveAttributeName` instead.
43+
*/
3644
abstract string getAttributeName();
3745
}
3846

0 commit comments

Comments
 (0)