Skip to content

Commit 1d64355

Browse files
committed
Overlay: Add overlay annotations to shared libraries
1 parent f29f327 commit 1d64355

58 files changed

Lines changed: 135 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

shared/controlflow/codeql/controlflow/BasicBlock.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* INTERNAL use only. This is an experimental API subject to change without
66
* notice.
77
*/
8+
overlay[local?]
9+
module;
810

911
private import codeql.util.Location
1012

shared/controlflow/codeql/controlflow/Cfg.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Provides a shared interface and implementation for constructing control-flow graphs
33
* (CFGs) from abstract syntax trees (ASTs).
44
*/
5+
overlay[local?]
6+
module;
57

68
private import codeql.util.Location
79
private import codeql.util.FileSystem

shared/dataflow/codeql/dataflow/DataFlow.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* adds a global analysis, mainly exposed through the `Global` and `GlobalWithState`
44
* modules.
55
*/
6+
overlay[local?]
7+
module;
68

79
private import codeql.util.Location
810

shared/dataflow/codeql/dataflow/TaintTracking.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Provides modules for performing local (intra-procedural) and
33
* global (inter-procedural) taint-tracking analyses.
44
*/
5+
overlay[local?]
6+
module;
57

68
private import DataFlow as DF
79
private import internal.DataFlowImpl

shared/dataflow/codeql/dataflow/VariableCapture.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Provides a module for synthesizing data-flow nodes and related step relations
33
* for supporting flow through captured variables.
44
*/
5+
overlay[local?]
6+
module;
57

68
private import codeql.util.Boolean
79
private import codeql.util.Unit

shared/dataflow/codeql/dataflow/internal/AccessPathSyntax.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* This file is used by the shared data flow library and by the JavaScript libraries
66
* (which does not use the shared data flow libraries).
77
*/
8+
overlay[local?]
9+
module;
810

911
/**
1012
* Convenience-predicate for extracting two capture groups at once.

shared/dataflow/codeql/dataflow/internal/ContentDataFlowImpl.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* steps, followed by 0 or more stores, with value-preserving steps allowed in
2323
* between all other steps.
2424
*/
25+
overlay[local?]
26+
module;
2527

2628
private import codeql.dataflow.DataFlow
2729
private import codeql.util.Boolean

shared/dataflow/codeql/dataflow/internal/DataFlowImpl.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*
44
* Provides an implementation of global (interprocedural) data flow.
55
*/
6+
overlay[local?]
7+
module;
68

79
private import codeql.util.Unit
810
private import codeql.util.Option
@@ -792,6 +794,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
792794
innercc = getCallContextCall(call, inner)
793795
}
794796

797+
overlay[caller]
795798
pragma[inline]
796799
predicate fwdFlowIn(
797800
Call call, ArgNd arg, Callable inner, ParamNd p, Cc outercc, CcCall innercc,
@@ -2321,6 +2324,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
23212324
* For more information, see
23222325
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
23232326
*/
2327+
overlay[caller]
23242328
pragma[inline]
23252329
deprecated final predicate hasLocationInfo(
23262330
string filepath, int startline, int startcolumn, int endline, int endcolumn
@@ -2524,6 +2528,7 @@ module MakeImpl<LocationSig Location, InputSig<Location> Lang> {
25242528

25252529
class ApHeadContent = Unit;
25262530

2531+
overlay[caller]
25272532
pragma[inline]
25282533
ApHeadContent getHeadContent(Ap ap) { exists(result) and ap = true }
25292534

shared/dataflow/codeql/dataflow/internal/DataFlowImplCommon.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
overlay[local?]
2+
module;
3+
14
private import codeql.dataflow.DataFlow
25
private import codeql.typetracking.TypeTracking as Tt
36
private import codeql.util.Location
@@ -674,6 +677,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
674677

675678
class CcCall = CallContextCall;
676679

680+
overlay[caller]
677681
pragma[inline]
678682
predicate matchesCall(CcCall cc, Call call) {
679683
cc = Input2::getSpecificCallContextCall(call, _) or
@@ -885,6 +889,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
885889
pragma[nomagic]
886890
private Callable getEnclosingCallable0() { nodeEnclosingCallable(this.projectToNode(), result) }
887891

892+
overlay[caller]
888893
pragma[inline]
889894
Callable getEnclosingCallable() {
890895
pragma[only_bind_out](this).getEnclosingCallable0() = pragma[only_bind_into](result)
@@ -899,6 +904,7 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
899904
isTopType(result) and this.isImplicitReadNode(_)
900905
}
901906

907+
overlay[caller]
902908
pragma[inline]
903909
Type getType() { pragma[only_bind_out](this).getType0() = pragma[only_bind_into](result) }
904910

@@ -2410,12 +2416,14 @@ module MakeImplCommon<LocationSig Location, InputSig<Location> Lang> {
24102416
* predicate ensures that joins go from `n` to the result instead of the other
24112417
* way around.
24122418
*/
2419+
overlay[caller]
24132420
pragma[inline]
24142421
Callable getNodeEnclosingCallable(Node n) {
24152422
nodeEnclosingCallable(pragma[only_bind_out](n), pragma[only_bind_into](result))
24162423
}
24172424

24182425
/** Gets the type of `n` used for type pruning. */
2426+
overlay[caller]
24192427
pragma[inline]
24202428
Type getNodeDataFlowType(Node n) {
24212429
nodeType(pragma[only_bind_out](n), pragma[only_bind_into](result))

shared/dataflow/codeql/dataflow/internal/DataFlowImplConsistency.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* Provides consistency queries for checking invariants in the language-specific
33
* data-flow classes and predicates.
44
*/
5+
overlay[local?]
6+
module;
57

68
private import codeql.dataflow.DataFlow as DF
79
private import codeql.dataflow.TaintTracking as TT

0 commit comments

Comments
 (0)