11# This script is used to annotate .qll files without any existing overlay annotations
2- # with overlay[local?] and overlay[caller] annotations. Maintenance of overlay annotations
2+ # with overlay[local?] and overlay[caller? ] annotations. Maintenance of overlay annotations
33# in annotated files will be handled by QL-for-QL queries.
44
55# It will walk the directory tree and annotate most .qll files, skipping only
@@ -24,7 +24,7 @@ def has_overlay_annotations(lines):
2424 '''
2525 Check whether the given lines contain any overlay[...] annotations.
2626 '''
27- overlays = ["local" , "local?" , "global" , "caller" ]
27+ overlays = ["local" , "local?" , "global" , "caller" , "caller?" ]
2828 annotations = [f"overlay[{ t } ]" for t in overlays ]
2929 return any (ann in line for ann in annotations for line in lines )
3030
@@ -165,15 +165,15 @@ def insert_toplevel_maybe_local_annotation(filename, lines):
165165
166166def insert_overlay_caller_annotations (lines ):
167167 '''
168- Mark pragma[inline] predicates as overlay[caller] if they are not declared private.
168+ Mark pragma[inline] predicates as overlay[caller? ] if they are not declared private.
169169 '''
170170 out_lines = []
171171 for i , line in enumerate (lines ):
172172 trimmed = line .strip ()
173173 if trimmed == "pragma[inline]" :
174174 if i + 1 < len (lines ) and not "private" in lines [i + 1 ]:
175175 whitespace = line [0 : line .find (trimmed )]
176- out_lines .append (f"{ whitespace } overlay[caller]\n " )
176+ out_lines .append (f"{ whitespace } overlay[caller? ]\n " )
177177 out_lines .append (line )
178178 return out_lines
179179
0 commit comments