Skip to content

Commit 4f47b89

Browse files
committed
unified: Add some missing qldoc
1 parent c4c4b97 commit 4f47b89

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

shared/namebinding/codeql/namebinding/LocalNameBinding.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ module LocalNameBinding<LocationSig Location, LocalNameBindingInputSig<Location>
382382
)
383383
}
384384

385+
/** Holds if `access` resolves to `l`. */
385386
predicate access(AstNode access, Local l) {
386387
exists(Scope lookup, string name |
387388
accessCandInLookupScope(access, name, lookup) and
@@ -412,6 +413,7 @@ module LocalNameBinding<LocationSig Location, LocalNameBindingInputSig<Location>
412413

413414
private module DefaultAccesses = ResolveAccesses<accessCand/2>;
414415

416+
/** Holds if `access` resolves to `l`. */
415417
cached
416418
predicate access(AstNode access, Local l) {
417419
CachedStage::ref() and

unified/ql/lib/codeql/unified/internal/LocalNameBinding.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ module Public {
367367
/** Gets the name of this local, as a string. */
368368
string getName() { result = super.getName() }
369369

370+
/** Gets an access to this entity, through its lexically scoped name. */
370371
LocalNameAccess getAnAccess() { result.getLocalName() = this }
371372

372373
/** Gets a name binding that declares this local name. */
@@ -458,8 +459,10 @@ module Public {
458459
* ```
459460
*/
460461
class PotentialLocalNameAccess extends IdentifierExpr {
462+
/** Gets the representative for the local name being accessed. */
461463
LocalName getLocalName() { result = this.(LocalNameBindingOutput::LocalAccess).getLocal() }
462464

465+
/** Gets the name being accessed. */
463466
string getName() { result = this.getValue() }
464467

465468
/** Holds if this is one of the binding sites for a name, such as the `x` in `let x = 123`. */

unified/ql/lib/utils/test/TestUtils.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ private predicate declAt(NameBinding v, string filepath, int line) {
2323
v.getLocation().hasLocationInfo(filepath, line, _, _, _)
2424
}
2525

26+
/** Holds if the name-binding `v` has been assigned the given `alias` by a comment in the test code. */
2627
predicate nameBinding(NameBinding v, string alias) {
2728
exists(string filepath, int line | declAt(v, filepath, line) |
2829
keyValueCommentAt(filepath, line, "name", alias)

0 commit comments

Comments
 (0)