Skip to content

Commit e11f6b5

Browse files
committed
ruby/python: adjust shared file
- move `isNonLocal` to the top - missing backtics
1 parent b5961c7 commit e11f6b5

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/SummaryTypeTracker.qll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ signature module Output<Input I> {
133133
* Implementation of the summary type tracker, that is type tracking through flow summaries.
134134
*/
135135
module SummaryFlow<Input I> implements Output<I> {
136+
pragma[nomagic]
137+
private predicate isNonLocal(I::SummaryComponent component) {
138+
component = I::content(_)
139+
or
140+
component = I::withContent(_)
141+
}
142+
136143
pragma[nomagic]
137144
private predicate hasLoadSummary(
138145
I::SummarizedCallable callable, I::TypeTrackerContent contents, I::SummaryComponentStack input,
@@ -210,15 +217,8 @@ module SummaryFlow<Input I> implements Output<I> {
210217
)
211218
}
212219

213-
pragma[nomagic]
214-
private predicate isNonLocal(I::SummaryComponent component) {
215-
component = I::content(_)
216-
or
217-
component = I::withContent(_)
218-
}
219-
220220
/**
221-
* Gets a data flow I::Node corresponding an argument or return value of `call`,
221+
* Gets a data flow `I::Node` corresponding an argument or return value of `call`,
222222
* as specified by `component`.
223223
*/
224224
bindingset[call, component]

ruby/ql/lib/codeql/ruby/typetracking/internal/SummaryTypeTracker.qll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ signature module Output<Input I> {
133133
* Implementation of the summary type tracker, that is type tracking through flow summaries.
134134
*/
135135
module SummaryFlow<Input I> implements Output<I> {
136+
pragma[nomagic]
137+
private predicate isNonLocal(I::SummaryComponent component) {
138+
component = I::content(_)
139+
or
140+
component = I::withContent(_)
141+
}
142+
136143
pragma[nomagic]
137144
private predicate hasLoadSummary(
138145
I::SummarizedCallable callable, I::TypeTrackerContent contents, I::SummaryComponentStack input,
@@ -210,15 +217,8 @@ module SummaryFlow<Input I> implements Output<I> {
210217
)
211218
}
212219

213-
pragma[nomagic]
214-
private predicate isNonLocal(I::SummaryComponent component) {
215-
component = I::content(_)
216-
or
217-
component = I::withContent(_)
218-
}
219-
220220
/**
221-
* Gets a data flow I::Node corresponding an argument or return value of `call`,
221+
* Gets a data flow `I::Node` corresponding an argument or return value of `call`,
222222
* as specified by `component`.
223223
*/
224224
bindingset[call, component]

0 commit comments

Comments
 (0)