Swift: limit Cfg.ql to test source locations

This commit is contained in:
Paolo Tranquilli
2022-06-03 16:10:15 +02:00
committed by Alex Denisov
parent 26d3c4a7fc
commit b6342ba2a0
2 changed files with 1 additions and 11 deletions

View File

@@ -4811,10 +4811,6 @@ cfg.swift:
#-----| -> exit init
# 378| init
<<<<<<< HEAD
=======
#-----| -> TBD (OtherConstructorDeclRefExpr)
>>>>>>> d532f3b4d5 (Swift: extract system and builtin modules separately)
#-----| -> call to ...
# 379| super
@@ -4829,15 +4825,9 @@ cfg.swift:
# 379| self = ...
#-----| -> return
# 379| TBD (OtherConstructorDeclRefExpr)
#-----| -> super
<<<<<<< HEAD
=======
# 379| call to ...
#-----| -> super
>>>>>>> d532f3b4d5 (Swift: extract system and builtin modules separately)
# 379| 0
#-----| -> call to ...

View File

@@ -6,5 +6,5 @@ import codeql.swift.controlflow.ControlFlowGraph
import codeql.swift.controlflow.internal.ControlFlowGraphImpl::TestOutput
class MyRelevantNode extends RelevantNode {
MyRelevantNode() { exists(this) }
MyRelevantNode() { getScope().getLocation().getFile().getName().matches("%swift/ql/test%") }
}