Skip to content

Commit 6e32f27

Browse files
committed
Rename predicates to be consistent with qlpack
In preparation for migrating to the FlowSummary module in the qlpack, rename predicates to be consistent with the qlpack.
1 parent 6c8fb61 commit 6e32f27

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

javascript/ql/lib/semmle/javascript/dataflow/FlowSummary.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ abstract class SummarizedCallable extends LibraryCallable, Impl::Public::Summari
8484
DataFlow::ParameterNode getParameter(string s) {
8585
exists(ParameterPosition pos |
8686
DataFlowImplCommon::parameterNode(result, MkLibraryCallable(this), pos) and
87-
s = getParameterPosition(pos)
87+
s = encodeParameterPosition(pos)
8888
)
8989
}
9090
}

javascript/ql/lib/semmle/javascript/dataflow/internal/FlowSummaryPrivate.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,15 @@ string getMadRepresentationSpecific(SummaryComponent sc) {
286286

287287
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
288288
bindingset[pos]
289-
string getParameterPosition(ParameterPosition pos) { positionName(pos, result) and result != "any" }
289+
string encodeParameterPosition(ParameterPosition pos) {
290+
positionName(pos, result) and result != "any"
291+
}
290292

291293
/** Gets the textual representation of an argument position in the format used for flow summaries. */
292294
bindingset[pos]
293-
string getArgumentPosition(ArgumentPosition pos) { positionName(pos, result) and result != "any" }
295+
string encodeArgumentPosition(ArgumentPosition pos) {
296+
positionName(pos, result) and result != "any"
297+
}
294298

295299
/** Holds if input specification component `c` needs a reference. */
296300
predicate inputNeedsReferenceSpecific(string c) { none() }

javascript/ql/lib/semmle/javascript/dataflow/internal/sharedlib/FlowSummaryImpl.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ module Public {
3030
or
3131
exists(ArgumentPosition pos |
3232
this = TParameterSummaryComponent(pos) and
33-
result = "Parameter[" + getArgumentPosition(pos) + "]"
33+
result = "Parameter[" + encodeArgumentPosition(pos) + "]"
3434
)
3535
or
3636
exists(ParameterPosition pos |
3737
this = TArgumentSummaryComponent(pos) and
38-
result = "Argument[" + getParameterPosition(pos) + "]"
38+
result = "Argument[" + encodeParameterPosition(pos) + "]"
3939
)
4040
or
4141
exists(string synthetic |

0 commit comments

Comments
 (0)