Skip to content

Commit 595fc75

Browse files
IdrissRioCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5c2e5f8 commit 595fc75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cpp/ql/lib/semmle/code/cpp/internal/Overlay.qll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ private predicate locallyInTrapOrTag(boolean isOverlayVariant, @element e, @trap
4141
* - We have knowledge about what TRAP file or tag it is in (in the base).
4242
* - It is not in any overlay TRAP file or tag that is reachable from an overlay source file.
4343
* - For every base TRAP file or tag that contains it and is reachable from a base source file,
44-
* either the source file has changed or the overlay has redefined the TRAP file or tag.
44+
* either the source file has changed, or the overlay has redefined the TRAP file or tag,
45+
* or the overlay runner has re-extracted the same source file.
4546
*/
4647
overlay[discard_entity]
4748
private predicate discardElement(@element e) {
@@ -54,7 +55,7 @@ private predicate discardElement(@element e) {
5455
not exists(@trap_or_tag t | locallyInTrapOrTag(true, e, t) |
5556
locallyReachableTrapOrTag(true, _, t)
5657
) and
57-
// Finally, we have to make sure that base shouldn't retain it.
58+
// Finally, we have to make sure the base variant does not retain it.
5859
// If it is reachable from a base source file, then that is
5960
// sufficient unless either the base source file has changed (in
6061
// particular, been deleted), or the overlay has redefined the TRAP

0 commit comments

Comments
 (0)