mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Implement getBasicBlock() for exceptional nodes
This commit is contained in:
@@ -788,6 +788,10 @@ module DataFlow {
|
||||
function.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
}
|
||||
|
||||
override BasicBlock getBasicBlock() {
|
||||
result = function.(ExprOrStmt).getBasicBlock()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the function corresponding to this exceptional return node.
|
||||
*/
|
||||
@@ -810,6 +814,10 @@ module DataFlow {
|
||||
invoke.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
|
||||
}
|
||||
|
||||
override BasicBlock getBasicBlock() {
|
||||
result = invoke.getBasicBlock()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the invocation corresponding to this exceptional return node.
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
| tst.js:1:10:1:11 | fs |
|
||||
| tst.js:1:10:1:11 | fs |
|
||||
| tst.js:1:20:1:23 | 'fs' |
|
||||
@@ -0,0 +1,5 @@
|
||||
import javascript
|
||||
|
||||
from DataFlow::Node node
|
||||
where not exists(node.getBasicBlock())
|
||||
select node
|
||||
Reference in New Issue
Block a user