mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
26 lines
666 B
Plaintext
26 lines
666 B
Plaintext
import javascript
|
|
|
|
class FooCall extends API::CallNode {
|
|
FooCall() {
|
|
this = API::moduleImport("mylibrary").getMember("foo").getACall()
|
|
}
|
|
|
|
DataFlow::Node getFirst() {
|
|
result = getParameter(0).getMember("value").getARhs()
|
|
}
|
|
|
|
DataFlow::Node getSecond() {
|
|
result = getParameter(1).getMember("value").getARhs()
|
|
}
|
|
}
|
|
|
|
query predicate values(FooCall call, int first, int second) {
|
|
first = call.getFirst().getIntValue() and
|
|
second = call.getSecond().getIntValue()
|
|
}
|
|
|
|
query predicate mismatch(FooCall call, string msg) {
|
|
call.getFirst().getIntValue() != call.getSecond().getIntValue() and
|
|
msg = "mismatching parameter indices found for call"
|
|
}
|