mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: Use question-mark variant in all overlay annotations
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Provides classes for working with basic blocks, and predicates for computing
|
||||
* liveness information for local variables.
|
||||
*/
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
module;
|
||||
|
||||
import javascript
|
||||
@@ -320,7 +320,7 @@ module Public {
|
||||
/**
|
||||
* Holds if this basic block strictly dominates `bb`.
|
||||
*/
|
||||
overlay[caller]
|
||||
overlay[caller?]
|
||||
pragma[inline]
|
||||
predicate strictlyDominates(ReachableBasicBlock bb) { this = immediateDominator+(bb) }
|
||||
|
||||
@@ -329,14 +329,14 @@ module Public {
|
||||
*
|
||||
* This predicate is reflexive: each reachable basic block dominates itself.
|
||||
*/
|
||||
overlay[caller]
|
||||
overlay[caller?]
|
||||
pragma[inline]
|
||||
predicate dominates(ReachableBasicBlock bb) { this = immediateDominator*(bb) }
|
||||
|
||||
/**
|
||||
* Holds if this basic block strictly post-dominates `bb`.
|
||||
*/
|
||||
overlay[caller]
|
||||
overlay[caller?]
|
||||
pragma[inline]
|
||||
predicate strictlyPostDominates(ReachableBasicBlock bb) { this = immediatePostDominator+(bb) }
|
||||
|
||||
@@ -345,7 +345,7 @@ module Public {
|
||||
*
|
||||
* This predicate is reflexive: each reachable basic block post-dominates itself.
|
||||
*/
|
||||
overlay[caller]
|
||||
overlay[caller?]
|
||||
pragma[inline]
|
||||
predicate postDominates(ReachableBasicBlock bb) { this = immediatePostDominator*(bb) }
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ module Stages {
|
||||
/**
|
||||
* The `ast` stage.
|
||||
*/
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
cached
|
||||
module Ast {
|
||||
/**
|
||||
@@ -85,7 +85,7 @@ module Stages {
|
||||
/**
|
||||
* The `basicblocks` stage.
|
||||
*/
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
cached
|
||||
module BasicBlocks {
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ module Stages {
|
||||
/**
|
||||
* The part of data flow computed before flow summary nodes.
|
||||
*/
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
cached
|
||||
module EarlyDataFlowStage {
|
||||
/**
|
||||
@@ -137,7 +137,7 @@ module Stages {
|
||||
/**
|
||||
* The `dataflow` stage.
|
||||
*/
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
cached
|
||||
module DataFlowStage {
|
||||
/**
|
||||
|
||||
@@ -2,10 +2,10 @@ private import javascript
|
||||
private import OverlayXml
|
||||
|
||||
/** Holds if the database is an overlay. */
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
private predicate isOverlay() { databaseMetadata("isOverlay", "true") }
|
||||
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
private string getFileFromEntity(@locatable node) {
|
||||
exists(@location loc |
|
||||
hasLocation(node, loc)
|
||||
@@ -19,11 +19,11 @@ private string getFileFromEntity(@locatable node) {
|
||||
}
|
||||
|
||||
/** Holds if `file` was changed or deleted in the overlay. */
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
private predicate discardFile(string file) { isOverlay() and overlayChangedFiles(file) }
|
||||
|
||||
/** Holds if `node` is in the `file` and is part of the overlay base database. */
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
private predicate discardableEntity(string file, @locatable node) {
|
||||
not isOverlay() and file = getFileFromEntity(node)
|
||||
}
|
||||
@@ -34,7 +34,7 @@ private predicate discardEntity(@locatable node) {
|
||||
exists(string file | discardableEntity(file, node) and discardFile(file))
|
||||
}
|
||||
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
private string getFileFromLocation(@location loc) {
|
||||
exists(@file file |
|
||||
locations_default(loc, file, _, _, _, _) and
|
||||
@@ -43,7 +43,7 @@ private string getFileFromLocation(@location loc) {
|
||||
}
|
||||
|
||||
/** Holds if `loc` is in the `file` and is part of the overlay base database. */
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
private predicate discardableLocation(string file, @location node) {
|
||||
not isOverlay() and file = getFileFromLocation(node)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
module;
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Provides predicates and classes for relating nodes to their
|
||||
* enclosing `StmtContainer`.
|
||||
*/
|
||||
overlay[local]
|
||||
overlay[local?]
|
||||
module;
|
||||
|
||||
private import javascript
|
||||
@@ -48,7 +48,7 @@ class NodeInStmtContainer extends Locatable, @node_in_stmt_container {
|
||||
/**
|
||||
* Gets the function or toplevel to which this node belongs.
|
||||
*/
|
||||
overlay[caller]
|
||||
overlay[caller?]
|
||||
pragma[inline]
|
||||
final StmtContainer getContainer() { result = getStmtContainer(this) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user