Skip to content

Commit e51b921

Browse files
author
Robert Marsh
committed
C++: QLDoc for Overlap in IR construction
1 parent e9b1d81 commit e51b921

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cpp/ql/src/semmle/code/cpp/ir/internal/Overlap.qll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,33 @@ private newtype TOverlap =
33
TMustTotallyOverlap() or
44
TMustExactlyOverlap()
55

6+
/**
7+
* Represents a possible overlap between two memory ranges.
8+
*/
69
abstract class Overlap extends TOverlap {
710
abstract string toString();
811
}
912

13+
/**
14+
* Represents a partial overlap between two memory ranges, which may or may not
15+
* actually occur in practice.
16+
*/
1017
class MayPartiallyOverlap extends Overlap, TMayPartiallyOverlap {
1118
final override string toString() { result = "MayPartiallyOverlap" }
1219
}
1320

21+
/**
22+
* Represents an overlap in which the first memory range is known to include all
23+
* bits of the second memory range, but may be larger or have a different type.
24+
*/
1425
class MustTotallyOverlap extends Overlap, TMustTotallyOverlap {
1526
final override string toString() { result = "MustTotallyOverlap" }
1627
}
1728

29+
/**
30+
* Represents an overlap between two memory ranges that have the same extent and
31+
* the same type.
32+
*/
1833
class MustExactlyOverlap extends Overlap, TMustExactlyOverlap {
1934
final override string toString() { result = "MustExactlyOverlap" }
2035
}

0 commit comments

Comments
 (0)