Skip to content

Commit b6342ba

Browse files
redsun82AlexDenisov
authored andcommitted
Swift: limit Cfg.ql to test source locations
1 parent 26d3c4a commit b6342ba

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

swift/ql/test/library-tests/controlflow/graph/Cfg.expected

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4811,10 +4811,6 @@ cfg.swift:
48114811
#-----| -> exit init
48124812

48134813
# 378| init
4814-
<<<<<<< HEAD
4815-
=======
4816-
#-----| -> TBD (OtherConstructorDeclRefExpr)
4817-
>>>>>>> d532f3b4d5 (Swift: extract system and builtin modules separately)
48184814
#-----| -> call to ...
48194815

48204816
# 379| super
@@ -4829,15 +4825,9 @@ cfg.swift:
48294825
# 379| self = ...
48304826
#-----| -> return
48314827

4832-
# 379| TBD (OtherConstructorDeclRefExpr)
4833-
#-----| -> super
4834-
4835-
<<<<<<< HEAD
4836-
=======
48374828
# 379| call to ...
48384829
#-----| -> super
48394830

4840-
>>>>>>> d532f3b4d5 (Swift: extract system and builtin modules separately)
48414831
# 379| 0
48424832
#-----| -> call to ...
48434833

swift/ql/test/library-tests/controlflow/graph/Cfg.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import codeql.swift.controlflow.ControlFlowGraph
66
import codeql.swift.controlflow.internal.ControlFlowGraphImpl::TestOutput
77

88
class MyRelevantNode extends RelevantNode {
9-
MyRelevantNode() { exists(this) }
9+
MyRelevantNode() { getScope().getLocation().getFile().getName().matches("%swift/ql/test%") }
1010
}

0 commit comments

Comments
 (0)