Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion javascript/ql/lib/Expressions/ExprHasNoEffect.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes and predicates for the 'js/useless-expression' query.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides a predicate for identifying unused index variables in loops.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/AMD.qll
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Provides classes for working with
* [Asynchronous Module Definitions](https://github.com/amdjs/amdjs-api/wiki/AMD).
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
4 changes: 2 additions & 2 deletions javascript/ql/lib/semmle/javascript/AST.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for working with the AST-based representation of JavaScript programs.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down Expand Up @@ -477,7 +477,7 @@ module AST {
DataFlow::AnalyzedNode analyze() { result = DataFlow::valueNode(this).analyze() }

/** Gets the data flow node associated with this program element. */
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::ValueNode flow() { result = DataFlow::valueNode(this) }

Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/CFG.qll
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
* Note that the `import` statement as a whole is part of the CFG of the body, while its single
* import specifier `x as y` forms part of the preamble.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Classes.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Class declarations and class expressions are modeled by (QL) classes `ClassDeclaration`
* and `ClassExpression`, respectively, which are both subclasses of `ClassDefinition`.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Closure.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for working with the Closure-Library module system.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Comments.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with JavaScript comments. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Constants.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for working with expressions that evaluate to constant values.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/DefUse.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes and predicates for working with variable definitions and uses. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/E4X.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for working with E4X.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/ES2015Modules.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with ECMAScript 2015 modules. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Errors.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with syntax errors. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
6 changes: 3 additions & 3 deletions javascript/ql/lib/semmle/javascript/Expr.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for working with expressions.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down Expand Up @@ -253,7 +253,7 @@ class Expr extends @expr, ExprOrStmt, ExprOrType, AST::ValueNode {
* Gets the data-flow node where exceptions thrown by this expression will
* propagate if this expression causes an exception to be thrown.
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::Node getExceptionTarget() {
result = getCatchParameterFromStmt(getRawEnclosingStmt(this))
Expand All @@ -271,7 +271,7 @@ private DataFlow::Node getCatchParameterFromStmt(Stmt stmt) {
DataFlow::parameterNode(stmt.getEnclosingTryCatchStmt().getACatchClause().getAParameter())
}

overlay[caller]
overlay[caller?]
pragma[inline]
private Stmt getRawEnclosingStmt(Expr e) {
// For performance reasons, we need the enclosing statement without overrides
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Extend.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for reasoning about `extend`-like functions.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Externs.qll
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Array.prototype.length;
* </pre>
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Files.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with files and folders. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Functions.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with functions. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
18 changes: 9 additions & 9 deletions javascript/ql/lib/semmle/javascript/GlobalAccessPaths.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides predicates for associating qualified names with data flow nodes.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down Expand Up @@ -357,7 +357,7 @@ module AccessPath {
* Gets a variable that is relevant for the computations in the `GetLaterAccess` module.
* This predicate restricts as much as it can, but without depending on `getAVariableRef`.
*/
overlay[caller]
overlay[caller?]
pragma[inline]
private SsaVariable getARelevantVariableSimple() {
// The variable might be used where `getLaterBaseAccess()` is called.
Expand Down Expand Up @@ -409,7 +409,7 @@ module AccessPath {
* }
* ```
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::Node getAReferenceTo(Root root, string path) {
path = fromReference(result, root) and
Expand All @@ -433,7 +433,7 @@ module AccessPath {
* })(NS = NS || {});
* ```
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::Node getAReferenceTo(string path) {
path = fromReference(result, DataFlow::globalAccessPathRootPseudoNode())
Expand All @@ -455,7 +455,7 @@ module AccessPath {
* }
* ```
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::Node getAnAssignmentTo(Root root, string path) {
path = fromRhs(result, root) and
Expand All @@ -477,7 +477,7 @@ module AccessPath {
* })(foo = foo || {});
* ```
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::Node getAnAssignmentTo(string path) {
path = fromRhs(result, DataFlow::globalAccessPathRootPseudoNode())
Expand All @@ -488,7 +488,7 @@ module AccessPath {
*
* See `getAReferenceTo` and `getAnAssignmentTo` for more details.
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::Node getAReferenceOrAssignmentTo(string path) {
result = getAReferenceTo(path)
Expand All @@ -501,7 +501,7 @@ module AccessPath {
*
* See `getAReferenceTo` and `getAnAssignmentTo` for more details.
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::Node getAReferenceOrAssignmentTo(Root root, string path) {
result = getAReferenceTo(root, path)
Expand Down Expand Up @@ -530,7 +530,7 @@ module AccessPath {
/**
* Gets a `SourceNode` that refers to the same value or access path as the given node.
*/
overlay[caller]
overlay[caller?]
pragma[inline]
DataFlow::SourceNode getAnAliasedSourceNode(DataFlow::Node node) {
exists(DataFlow::SourceNode root, string accessPath |
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/HTML.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with HTML documents. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/JSDoc.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with JSDoc comments. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/JSON.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for working with JSON data.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/JSX.qll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Provides classes for working with JSX code.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Lines.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This information is only available for snapshots that have been extracted with
* the `--extract-program-text` flag.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
6 changes: 3 additions & 3 deletions javascript/ql/lib/semmle/javascript/Locations.qll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Provides classes for working with locations and program elements that have locations. */
overlay[local]
overlay[local?]
module;

import javascript
Expand Down Expand Up @@ -32,7 +32,7 @@ final class Location extends @location_default {
int getNumLines() { result = this.getEndLine() - this.getStartLine() + 1 }

/** Holds if this location starts before location `that`. */
overlay[caller]
overlay[caller?]
pragma[inline]
predicate startsBefore(Location that) {
exists(string f, int sl1, int sc1, int sl2, int sc2 |
Expand All @@ -46,7 +46,7 @@ final class Location extends @location_default {
}

/** Holds if this location ends after location `that`. */
overlay[caller]
overlay[caller?]
pragma[inline]
predicate endsAfter(Location that) {
exists(string f, int el1, int ec1, int el2, int ec2 |
Expand Down
2 changes: 1 addition & 1 deletion javascript/ql/lib/semmle/javascript/Modules.qll
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* ECMAScript 2015-style modules, and the older CommonJS and AMD-style
* modules.
*/
overlay[local]
overlay[local?]
module;

import javascript
Expand Down
12 changes: 6 additions & 6 deletions javascript/ql/lib/semmle/javascript/NodeJS.qll
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private import semmle.javascript.dataflow.internal.DataFlowNode
* process.stdout.write(fs.readFileSync(process.argv[i], 'utf8'));
* ```
*/
overlay[local]
overlay[local?]
class NodeModule extends Module {
NodeModule() {
is_module(this) and
Expand Down Expand Up @@ -234,7 +234,7 @@ predicate findNodeModulesFolder(Folder f, Folder nodeModules, int distance) {
/**
* A Node.js `require` variable.
*/
overlay[local]
overlay[local?]
private class RequireVariable extends Variable {
RequireVariable() {
this = any(ModuleScope m).getVariable("require")
Expand All @@ -247,7 +247,7 @@ private class RequireVariable extends Variable {
}
}

overlay[local]
overlay[local?]
private predicate isModuleModule(EarlyStageNode nd) {
exists(ImportDeclaration imp | imp.getRawImportPath() = "module" |
nd = TDestructuredModuleImportNode(imp)
Expand All @@ -261,7 +261,7 @@ private predicate isModuleModule(EarlyStageNode nd) {
)
}

overlay[local]
overlay[local?]
private predicate isCreateRequire(EarlyStageNode nd) {
exists(PropAccess prop |
isModuleModule(TValueNode(prop.getBase())) and
Expand Down Expand Up @@ -291,7 +291,7 @@ private predicate isCreateRequire(EarlyStageNode nd) {
/**
* Holds if `nd` may refer to `require`, either directly or modulo local data flow.
*/
overlay[local]
overlay[local?]
cached
private predicate isRequire(EarlyStageNode nd) {
exists(VarAccess access |
Expand Down Expand Up @@ -334,7 +334,7 @@ private predicate isRequire(EarlyStageNode nd) {
* require('fs')
* ```
*/
overlay[local]
overlay[local?]
class Require extends CallExpr, Import {
Require() { isRequire(TValueNode(this.getCallee())) }

Expand Down
Loading