mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Kotlin: Fix CFG for string templates
This commit is contained in:
@@ -459,6 +459,8 @@ private module ControlFlowGraphImpl {
|
||||
this instanceof LocalVariableDeclExpr and
|
||||
not this = any(InstanceOfExpr ioe).getLocalVariableDeclExpr()
|
||||
or
|
||||
this instanceof StringTemplateExpr
|
||||
or
|
||||
this instanceof RValue
|
||||
or
|
||||
this instanceof Call // includes both expressions and statements
|
||||
@@ -548,6 +550,10 @@ private module ControlFlowGraphImpl {
|
||||
result = e.getArgument(index)
|
||||
)
|
||||
or
|
||||
exists(StringTemplateExpr e | e = this |
|
||||
result = e.getComponent(index)
|
||||
)
|
||||
or
|
||||
index = 0 and result = this.(ReturnStmt).getResult()
|
||||
or
|
||||
index = 0 and result = this.(ThrowStmt).getExpr()
|
||||
|
||||
Reference in New Issue
Block a user