mirror of
https://github.com/github/codeql.git
synced 2026-06-23 13:47:03 +02:00
Add type mentions to control flow element handling
This commit is contained in:
committed by
GitHub
parent
7197cc56dd
commit
d7ec468e2e
@@ -121,6 +121,13 @@ private module Cached {
|
||||
result = getAChildExpr(parent)
|
||||
or
|
||||
result = parent.getAChildStmt()
|
||||
or
|
||||
result =
|
||||
any(TypeMention tm |
|
||||
tm.getTarget() = parent
|
||||
or
|
||||
tm.getParent+().getTarget() = parent
|
||||
)
|
||||
}
|
||||
|
||||
private predicate parent(ControlFlowElement child, ExprOrStmtParent parent) {
|
||||
|
||||
@@ -20,7 +20,7 @@ class ControlFlowElementOrCallable extends ExprOrStmtParent, TControlFlowElement
|
||||
*/
|
||||
class ControlFlowElement extends ControlFlowElementOrCallable, @control_flow_element {
|
||||
/** Gets the enclosing callable of this element, if any. */
|
||||
Callable getEnclosingCallable() { none() }
|
||||
Callable getEnclosingCallable() { enclosingCallable(this, result) }
|
||||
|
||||
/** Gets the assembly that this element was compiled into. */
|
||||
Assembly getAssembly() {
|
||||
|
||||
@@ -1369,7 +1369,7 @@ compiler_generated(unique int id: @element ref);
|
||||
|
||||
/** CONTROL/DATA FLOW **/
|
||||
|
||||
@control_flow_element = @stmt | @expr | @parameter;
|
||||
@control_flow_element = @stmt | @expr | @parameter | @type_mention;
|
||||
|
||||
/* XML Files */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user