mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Swift: Add tests and accept test changes.
This commit is contained in:
53
swift/ql/test/extractor-tests/declarations/accessor.expected
Normal file
53
swift/ql/test/extractor-tests/declarations/accessor.expected
Normal file
@@ -0,0 +1,53 @@
|
||||
| test.swift:2:7:2:7 | AccessorDecl | ? |
|
||||
| test.swift:2:7:2:7 | AccessorDecl | get |
|
||||
| test.swift:2:7:2:7 | AccessorDecl | set |
|
||||
| test.swift:3:7:3:7 | AccessorDecl | ? |
|
||||
| test.swift:4:5:4:24 | AccessorDecl | get |
|
||||
| test.swift:5:5:5:38 | AccessorDecl | set |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | ? |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | get |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | set |
|
||||
| test.swift:23:9:23:9 | AccessorDecl | ? |
|
||||
| test.swift:23:31:23:31 | AccessorDecl | get |
|
||||
| test.swift:23:35:23:35 | AccessorDecl | set |
|
||||
| test.swift:24:40:24:40 | AccessorDecl | get |
|
||||
| test.swift:32:3:34:3 | AccessorDecl | get |
|
||||
| test.swift:35:3:35:18 | AccessorDecl | set |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | ? |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | get |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | set |
|
||||
| test.swift:70:5:72:5 | AccessorDecl | get |
|
||||
| test.swift:77:20:77:20 | AccessorDecl | get |
|
||||
| test.swift:82:7:82:7 | AccessorDecl | ? |
|
||||
| test.swift:83:5:83:11 | AccessorDecl | set |
|
||||
| test.swift:84:5:86:5 | AccessorDecl | get |
|
||||
| test.swift:91:27:93:3 | AccessorDecl | get |
|
||||
| test.swift:97:5:99:5 | AccessorDecl | get |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | ? |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | get |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | set |
|
||||
| test.swift:104:3:104:3 | AccessorDecl | ? |
|
||||
| test.swift:105:5:107:5 | AccessorDecl | get |
|
||||
| test.swift:108:5:108:11 | AccessorDecl | set |
|
||||
| test.swift:111:37:113:3 | AccessorDecl | get |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | ? |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | get |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | set |
|
||||
| test.swift:116:5:116:25 | AccessorDecl | willSet |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | ? |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | get |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | set |
|
||||
| test.swift:120:5:120:15 | AccessorDecl | willSet |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | ? |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | get |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | set |
|
||||
| test.swift:124:5:124:24 | AccessorDecl | didSet |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | ? |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | get |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | set |
|
||||
| test.swift:128:5:128:14 | AccessorDecl | didSet |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | ? |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | get |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | set |
|
||||
| test.swift:132:5:132:15 | AccessorDecl | willSet |
|
||||
| test.swift:134:5:134:14 | AccessorDecl | didSet |
|
||||
21
swift/ql/test/extractor-tests/declarations/accessor.ql
Normal file
21
swift/ql/test/extractor-tests/declarations/accessor.ql
Normal file
@@ -0,0 +1,21 @@
|
||||
import swift
|
||||
|
||||
predicate isKnownKind(AccessorDecl decl, string kind) {
|
||||
decl.isGetter() and kind = "get"
|
||||
or
|
||||
decl.isSetter() and kind = "set"
|
||||
or
|
||||
decl.isDidSet() and kind = "didSet"
|
||||
or
|
||||
decl.isWillSet() and kind = "willSet"
|
||||
}
|
||||
|
||||
from AccessorDecl decl, string kind
|
||||
where
|
||||
exists(decl.getLocation()) and
|
||||
(
|
||||
isKnownKind(decl, kind)
|
||||
or
|
||||
not isKnownKind(decl, _) and kind = "?"
|
||||
)
|
||||
select decl, kind
|
||||
@@ -3,14 +3,32 @@
|
||||
| test.swift:1:8:1:8 | ConstructorDecl |
|
||||
| test.swift:1:8:1:8 | ParamDecl |
|
||||
| test.swift:2:3:2:11 | PatternBindingDecl |
|
||||
| test.swift:2:7:2:7 | AccessorDecl |
|
||||
| test.swift:2:7:2:7 | AccessorDecl |
|
||||
| test.swift:2:7:2:7 | AccessorDecl |
|
||||
| test.swift:2:7:2:7 | ConcreteVarDecl |
|
||||
| test.swift:2:7:2:7 | ParamDecl |
|
||||
| test.swift:2:7:2:7 | ParamDecl |
|
||||
| test.swift:2:7:2:7 | ParamDecl |
|
||||
| test.swift:3:3:6:3 | PatternBindingDecl |
|
||||
| test.swift:3:7:3:7 | AccessorDecl |
|
||||
| test.swift:3:7:3:7 | ConcreteVarDecl |
|
||||
| test.swift:4:5:4:5 | ParamDecl |
|
||||
| test.swift:4:5:4:24 | AccessorDecl |
|
||||
| test.swift:5:5:5:5 | ParamDecl |
|
||||
| test.swift:5:5:5:38 | AccessorDecl |
|
||||
| test.swift:5:9:5:9 | ParamDecl |
|
||||
| test.swift:9:1:9:34 | ClassDecl |
|
||||
| test.swift:9:7:9:7 | ConstructorDecl |
|
||||
| test.swift:9:7:9:7 | DestructorDecl |
|
||||
| test.swift:9:13:9:30 | PatternBindingDecl |
|
||||
| test.swift:9:17:9:17 | AccessorDecl |
|
||||
| test.swift:9:17:9:17 | AccessorDecl |
|
||||
| test.swift:9:17:9:17 | AccessorDecl |
|
||||
| test.swift:9:17:9:17 | ConcreteVarDecl |
|
||||
| test.swift:9:17:9:17 | ParamDecl |
|
||||
| test.swift:9:17:9:17 | ParamDecl |
|
||||
| test.swift:9:17:9:17 | ParamDecl |
|
||||
| test.swift:11:1:14:1 | EnumDecl |
|
||||
| test.swift:12:5:12:18 | EnumCaseDecl |
|
||||
| test.swift:12:10:12:10 | EnumElementDecl |
|
||||
@@ -33,9 +51,14 @@
|
||||
| test.swift:19:29:19:29 | ParamDecl |
|
||||
| test.swift:22:1:26:1 | ProtocolDecl |
|
||||
| test.swift:23:5:23:39 | PatternBindingDecl |
|
||||
| test.swift:23:9:23:9 | AccessorDecl |
|
||||
| test.swift:23:9:23:9 | ConcreteVarDecl |
|
||||
| test.swift:23:31:23:31 | AccessorDecl |
|
||||
| test.swift:23:35:23:35 | AccessorDecl |
|
||||
| test.swift:23:35:23:35 | ParamDecl |
|
||||
| test.swift:24:5:24:44 | PatternBindingDecl |
|
||||
| test.swift:24:9:24:9 | ConcreteVarDecl |
|
||||
| test.swift:24:40:24:40 | AccessorDecl |
|
||||
| test.swift:25:5:25:22 | ConcreteFuncDecl |
|
||||
| test.swift:28:1:28:37 | ConcreteFuncDecl |
|
||||
| test.swift:28:17:28:31 | ParamDecl |
|
||||
@@ -45,10 +68,19 @@
|
||||
| test.swift:31:1:36:1 | PatternBindingDecl |
|
||||
| test.swift:31:1:36:1 | TopLevelCodeDecl |
|
||||
| test.swift:31:5:31:5 | ConcreteVarDecl |
|
||||
| test.swift:32:3:34:3 | AccessorDecl |
|
||||
| test.swift:35:3:35:18 | AccessorDecl |
|
||||
| test.swift:35:7:35:7 | ParamDecl |
|
||||
| test.swift:38:1:38:33 | TopLevelCodeDecl |
|
||||
| test.swift:40:1:53:1 | ClassDecl |
|
||||
| test.swift:41:3:41:14 | PatternBindingDecl |
|
||||
| test.swift:41:7:41:7 | AccessorDecl |
|
||||
| test.swift:41:7:41:7 | AccessorDecl |
|
||||
| test.swift:41:7:41:7 | AccessorDecl |
|
||||
| test.swift:41:7:41:7 | ConcreteVarDecl |
|
||||
| test.swift:41:7:41:7 | ParamDecl |
|
||||
| test.swift:41:7:41:7 | ParamDecl |
|
||||
| test.swift:41:7:41:7 | ParamDecl |
|
||||
| test.swift:42:3:42:3 | ParamDecl |
|
||||
| test.swift:42:3:44:3 | ConstructorDecl |
|
||||
| test.swift:46:3:46:3 | ParamDecl |
|
||||
@@ -63,6 +95,102 @@
|
||||
| test.swift:68:25:68:25 | ConstructorDecl |
|
||||
| test.swift:69:3:73:3 | PatternBindingDecl |
|
||||
| test.swift:69:7:69:7 | ConcreteVarDecl |
|
||||
| test.swift:70:5:72:5 | AccessorDecl |
|
||||
| test.swift:76:1:79:1 | ConcreteFuncDecl |
|
||||
| test.swift:77:16:77:23 | PatternBindingDecl |
|
||||
| test.swift:77:20:77:20 | AccessorDecl |
|
||||
| test.swift:77:20:77:20 | ConcreteVarDecl |
|
||||
| test.swift:77:20:77:20 | ConcreteVarDecl |
|
||||
| test.swift:81:1:136:1 | StructDecl |
|
||||
| test.swift:81:8:81:8 | ConstructorDecl |
|
||||
| test.swift:81:8:81:8 | ParamDecl |
|
||||
| test.swift:81:8:81:8 | ParamDecl |
|
||||
| test.swift:81:8:81:8 | ParamDecl |
|
||||
| test.swift:81:8:81:8 | ParamDecl |
|
||||
| test.swift:81:8:81:8 | ParamDecl |
|
||||
| test.swift:81:8:81:8 | ParamDecl |
|
||||
| test.swift:82:3:87:3 | PatternBindingDecl |
|
||||
| test.swift:82:7:82:7 | AccessorDecl |
|
||||
| test.swift:82:7:82:7 | ConcreteVarDecl |
|
||||
| test.swift:83:5:83:5 | ParamDecl |
|
||||
| test.swift:83:5:83:11 | AccessorDecl |
|
||||
| test.swift:84:5:86:5 | AccessorDecl |
|
||||
| test.swift:91:3:93:3 | PatternBindingDecl |
|
||||
| test.swift:91:7:91:7 | ConcreteVarDecl |
|
||||
| test.swift:91:27:93:3 | AccessorDecl |
|
||||
| test.swift:96:3:100:3 | PatternBindingDecl |
|
||||
| test.swift:96:7:96:7 | ConcreteVarDecl |
|
||||
| test.swift:97:5:99:5 | AccessorDecl |
|
||||
| test.swift:102:3:102:21 | PatternBindingDecl |
|
||||
| test.swift:102:7:102:7 | AccessorDecl |
|
||||
| test.swift:102:7:102:7 | AccessorDecl |
|
||||
| test.swift:102:7:102:7 | AccessorDecl |
|
||||
| test.swift:102:7:102:7 | ConcreteVarDecl |
|
||||
| test.swift:102:7:102:7 | ParamDecl |
|
||||
| test.swift:102:7:102:7 | ParamDecl |
|
||||
| test.swift:102:7:102:7 | ParamDecl |
|
||||
| test.swift:104:3:104:3 | AccessorDecl |
|
||||
| test.swift:104:3:109:3 | SubscriptDecl |
|
||||
| test.swift:104:13:104:13 | ParamDecl |
|
||||
| test.swift:104:13:104:13 | ParamDecl |
|
||||
| test.swift:104:13:104:16 | ParamDecl |
|
||||
| test.swift:105:5:107:5 | AccessorDecl |
|
||||
| test.swift:108:5:108:5 | ParamDecl |
|
||||
| test.swift:108:5:108:11 | AccessorDecl |
|
||||
| test.swift:111:3:113:3 | SubscriptDecl |
|
||||
| test.swift:111:13:111:13 | ParamDecl |
|
||||
| test.swift:111:13:111:16 | ParamDecl |
|
||||
| test.swift:111:21:111:21 | ParamDecl |
|
||||
| test.swift:111:21:111:25 | ParamDecl |
|
||||
| test.swift:111:37:113:3 | AccessorDecl |
|
||||
| test.swift:115:3:117:3 | PatternBindingDecl |
|
||||
| test.swift:115:7:115:7 | AccessorDecl |
|
||||
| test.swift:115:7:115:7 | AccessorDecl |
|
||||
| test.swift:115:7:115:7 | AccessorDecl |
|
||||
| test.swift:115:7:115:7 | ConcreteVarDecl |
|
||||
| test.swift:115:7:115:7 | ParamDecl |
|
||||
| test.swift:115:7:115:7 | ParamDecl |
|
||||
| test.swift:115:7:115:7 | ParamDecl |
|
||||
| test.swift:116:5:116:25 | AccessorDecl |
|
||||
| test.swift:116:13:116:13 | ParamDecl |
|
||||
| test.swift:119:3:121:3 | PatternBindingDecl |
|
||||
| test.swift:119:7:119:7 | AccessorDecl |
|
||||
| test.swift:119:7:119:7 | AccessorDecl |
|
||||
| test.swift:119:7:119:7 | AccessorDecl |
|
||||
| test.swift:119:7:119:7 | ConcreteVarDecl |
|
||||
| test.swift:119:7:119:7 | ParamDecl |
|
||||
| test.swift:119:7:119:7 | ParamDecl |
|
||||
| test.swift:119:7:119:7 | ParamDecl |
|
||||
| test.swift:120:5:120:5 | ParamDecl |
|
||||
| test.swift:120:5:120:15 | AccessorDecl |
|
||||
| test.swift:123:3:125:3 | PatternBindingDecl |
|
||||
| test.swift:123:7:123:7 | AccessorDecl |
|
||||
| test.swift:123:7:123:7 | AccessorDecl |
|
||||
| test.swift:123:7:123:7 | AccessorDecl |
|
||||
| test.swift:123:7:123:7 | ConcreteVarDecl |
|
||||
| test.swift:123:7:123:7 | ParamDecl |
|
||||
| test.swift:123:7:123:7 | ParamDecl |
|
||||
| test.swift:123:7:123:7 | ParamDecl |
|
||||
| test.swift:124:5:124:24 | AccessorDecl |
|
||||
| test.swift:124:12:124:12 | ParamDecl |
|
||||
| test.swift:127:3:129:3 | PatternBindingDecl |
|
||||
| test.swift:127:7:127:7 | AccessorDecl |
|
||||
| test.swift:127:7:127:7 | AccessorDecl |
|
||||
| test.swift:127:7:127:7 | AccessorDecl |
|
||||
| test.swift:127:7:127:7 | ConcreteVarDecl |
|
||||
| test.swift:127:7:127:7 | ParamDecl |
|
||||
| test.swift:127:7:127:7 | ParamDecl |
|
||||
| test.swift:127:7:127:7 | ParamDecl |
|
||||
| test.swift:127:7:127:7 | ParamDecl |
|
||||
| test.swift:128:5:128:14 | AccessorDecl |
|
||||
| test.swift:131:3:135:3 | PatternBindingDecl |
|
||||
| test.swift:131:7:131:7 | AccessorDecl |
|
||||
| test.swift:131:7:131:7 | AccessorDecl |
|
||||
| test.swift:131:7:131:7 | AccessorDecl |
|
||||
| test.swift:131:7:131:7 | ConcreteVarDecl |
|
||||
| test.swift:131:7:131:7 | ParamDecl |
|
||||
| test.swift:131:7:131:7 | ParamDecl |
|
||||
| test.swift:131:7:131:7 | ParamDecl |
|
||||
| test.swift:132:5:132:5 | ParamDecl |
|
||||
| test.swift:132:5:132:15 | AccessorDecl |
|
||||
| test.swift:134:5:134:14 | AccessorDecl |
|
||||
|
||||
@@ -1,4 +1,57 @@
|
||||
| test.swift:2:7:2:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:2:7:2:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:2:7:2:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:3:7:3:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:4:5:4:24 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:5:5:5:38 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:23:9:23:9 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:23:31:23:31 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:23:35:23:35 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:24:40:24:40 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:25:5:25:22 | ConcreteFuncDecl | random |
|
||||
| test.swift:28:1:28:37 | ConcreteFuncDecl | a_function |
|
||||
| test.swift:32:3:34:3 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:35:3:35:18 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:50:3:52:3 | ConcreteFuncDecl | +- |
|
||||
| test.swift:70:5:72:5 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:76:1:79:1 | ConcreteFuncDecl | foo |
|
||||
| test.swift:77:20:77:20 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:82:7:82:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:83:5:83:11 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:84:5:86:5 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:91:27:93:3 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:97:5:99:5 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:104:3:104:3 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:105:5:107:5 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:108:5:108:11 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:111:37:113:3 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:116:5:116:25 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:120:5:120:15 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:124:5:124:24 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:128:5:128:14 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:132:5:132:15 | AccessorDecl | (unnamed function decl) |
|
||||
| test.swift:134:5:134:14 | AccessorDecl | (unnamed function decl) |
|
||||
|
||||
@@ -1,3 +1,52 @@
|
||||
| test.swift:2:7:2:7 | AccessorDecl | test.swift:2:7:2:7 | BraceStmt |
|
||||
| test.swift:2:7:2:7 | AccessorDecl | test.swift:2:7:2:7 | BraceStmt |
|
||||
| test.swift:2:7:2:7 | AccessorDecl | test.swift:2:7:2:7 | BraceStmt |
|
||||
| test.swift:3:7:3:7 | AccessorDecl | test.swift:3:7:3:7 | BraceStmt |
|
||||
| test.swift:4:5:4:24 | AccessorDecl | test.swift:4:9:4:24 | BraceStmt |
|
||||
| test.swift:5:5:5:38 | AccessorDecl | test.swift:5:19:5:38 | BraceStmt |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | test.swift:9:17:9:17 | BraceStmt |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | test.swift:9:17:9:17 | BraceStmt |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | test.swift:9:17:9:17 | BraceStmt |
|
||||
| test.swift:28:1:28:37 | ConcreteFuncDecl | test.swift:28:36:28:37 | BraceStmt |
|
||||
| test.swift:32:3:34:3 | AccessorDecl | test.swift:32:7:34:3 | BraceStmt |
|
||||
| test.swift:35:3:35:18 | AccessorDecl | test.swift:35:17:35:18 | BraceStmt |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | test.swift:41:7:41:7 | BraceStmt |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | test.swift:41:7:41:7 | BraceStmt |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | test.swift:41:7:41:7 | BraceStmt |
|
||||
| test.swift:50:3:52:3 | ConcreteFuncDecl | test.swift:50:45:52:3 | BraceStmt |
|
||||
| test.swift:70:5:72:5 | AccessorDecl | test.swift:70:9:72:5 | BraceStmt |
|
||||
| test.swift:76:1:79:1 | ConcreteFuncDecl | test.swift:76:19:79:1 | BraceStmt |
|
||||
| test.swift:77:20:77:20 | AccessorDecl | test.swift:77:20:77:20 | BraceStmt |
|
||||
| test.swift:82:7:82:7 | AccessorDecl | test.swift:82:7:82:7 | BraceStmt |
|
||||
| test.swift:83:5:83:11 | AccessorDecl | test.swift:83:9:83:11 | BraceStmt |
|
||||
| test.swift:84:5:86:5 | AccessorDecl | test.swift:84:9:86:5 | BraceStmt |
|
||||
| test.swift:91:27:93:3 | AccessorDecl | test.swift:91:27:93:3 | BraceStmt |
|
||||
| test.swift:97:5:99:5 | AccessorDecl | test.swift:97:9:99:5 | BraceStmt |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | test.swift:102:7:102:7 | BraceStmt |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | test.swift:102:7:102:7 | BraceStmt |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | test.swift:102:7:102:7 | BraceStmt |
|
||||
| test.swift:104:3:104:3 | AccessorDecl | test.swift:104:3:104:3 | BraceStmt |
|
||||
| test.swift:105:5:107:5 | AccessorDecl | test.swift:105:9:107:5 | BraceStmt |
|
||||
| test.swift:108:5:108:11 | AccessorDecl | test.swift:108:9:108:11 | BraceStmt |
|
||||
| test.swift:111:37:113:3 | AccessorDecl | test.swift:111:37:113:3 | BraceStmt |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | test.swift:115:7:115:7 | BraceStmt |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | test.swift:115:7:115:7 | BraceStmt |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | test.swift:115:7:115:7 | BraceStmt |
|
||||
| test.swift:116:5:116:25 | AccessorDecl | test.swift:116:23:116:25 | BraceStmt |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | test.swift:119:7:119:7 | BraceStmt |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | test.swift:119:7:119:7 | BraceStmt |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | test.swift:119:7:119:7 | BraceStmt |
|
||||
| test.swift:120:5:120:15 | AccessorDecl | test.swift:120:13:120:15 | BraceStmt |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | test.swift:123:7:123:7 | BraceStmt |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | test.swift:123:7:123:7 | BraceStmt |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | test.swift:123:7:123:7 | BraceStmt |
|
||||
| test.swift:124:5:124:24 | AccessorDecl | test.swift:124:22:124:24 | BraceStmt |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | test.swift:127:7:127:7 | BraceStmt |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | test.swift:127:7:127:7 | BraceStmt |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | test.swift:127:7:127:7 | BraceStmt |
|
||||
| test.swift:128:5:128:14 | AccessorDecl | test.swift:128:12:128:14 | BraceStmt |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | test.swift:131:7:131:7 | BraceStmt |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | test.swift:131:7:131:7 | BraceStmt |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | test.swift:131:7:131:7 | BraceStmt |
|
||||
| test.swift:132:5:132:15 | AccessorDecl | test.swift:132:13:132:15 | BraceStmt |
|
||||
| test.swift:134:5:134:14 | AccessorDecl | test.swift:134:12:134:14 | BraceStmt |
|
||||
|
||||
@@ -1,2 +1,25 @@
|
||||
| test.swift:2:7:2:7 | AccessorDecl | 0 | test.swift:2:7:2:7 | ParamDecl |
|
||||
| test.swift:5:5:5:38 | AccessorDecl | 0 | test.swift:5:9:5:9 | ParamDecl |
|
||||
| test.swift:9:17:9:17 | AccessorDecl | 0 | test.swift:9:17:9:17 | ParamDecl |
|
||||
| test.swift:23:35:23:35 | AccessorDecl | 0 | test.swift:23:35:23:35 | ParamDecl |
|
||||
| test.swift:28:1:28:37 | ConcreteFuncDecl | 0 | test.swift:28:17:28:31 | ParamDecl |
|
||||
| test.swift:35:3:35:18 | AccessorDecl | 0 | test.swift:35:7:35:7 | ParamDecl |
|
||||
| test.swift:41:7:41:7 | AccessorDecl | 0 | test.swift:41:7:41:7 | ParamDecl |
|
||||
| test.swift:50:3:52:3 | ConcreteFuncDecl | 0 | test.swift:50:26:50:33 | ParamDecl |
|
||||
| test.swift:83:5:83:11 | AccessorDecl | 0 | test.swift:83:5:83:5 | ParamDecl |
|
||||
| test.swift:102:7:102:7 | AccessorDecl | 0 | test.swift:102:7:102:7 | ParamDecl |
|
||||
| test.swift:104:3:104:3 | AccessorDecl | 0 | file://:0:0:0:0 | ParamDecl |
|
||||
| test.swift:105:5:107:5 | AccessorDecl | 0 | test.swift:104:13:104:13 | ParamDecl |
|
||||
| test.swift:108:5:108:11 | AccessorDecl | 0 | test.swift:108:5:108:5 | ParamDecl |
|
||||
| test.swift:108:5:108:11 | AccessorDecl | 1 | test.swift:104:13:104:13 | ParamDecl |
|
||||
| test.swift:111:37:113:3 | AccessorDecl | 0 | test.swift:111:13:111:13 | ParamDecl |
|
||||
| test.swift:111:37:113:3 | AccessorDecl | 1 | test.swift:111:21:111:21 | ParamDecl |
|
||||
| test.swift:115:7:115:7 | AccessorDecl | 0 | test.swift:115:7:115:7 | ParamDecl |
|
||||
| test.swift:116:5:116:25 | AccessorDecl | 0 | test.swift:116:13:116:13 | ParamDecl |
|
||||
| test.swift:119:7:119:7 | AccessorDecl | 0 | test.swift:119:7:119:7 | ParamDecl |
|
||||
| test.swift:120:5:120:15 | AccessorDecl | 0 | test.swift:120:5:120:5 | ParamDecl |
|
||||
| test.swift:123:7:123:7 | AccessorDecl | 0 | test.swift:123:7:123:7 | ParamDecl |
|
||||
| test.swift:124:5:124:24 | AccessorDecl | 0 | test.swift:124:12:124:12 | ParamDecl |
|
||||
| test.swift:127:7:127:7 | AccessorDecl | 0 | test.swift:127:7:127:7 | ParamDecl |
|
||||
| test.swift:131:7:131:7 | AccessorDecl | 0 | test.swift:131:7:131:7 | ParamDecl |
|
||||
| test.swift:132:5:132:15 | AccessorDecl | 0 | test.swift:132:5:132:5 | ParamDecl |
|
||||
|
||||
@@ -77,3 +77,60 @@ func foo() -> Int {
|
||||
@ZeroWrapper var x: Int
|
||||
return x
|
||||
}
|
||||
|
||||
struct HasPropertyAndObserver {
|
||||
var settableField: Int {
|
||||
set { }
|
||||
get {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
// A field can be marked as read-only by dirctly implementing
|
||||
// the getter between the braces.
|
||||
var readOnlyField1: Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Or by adding an access declaration
|
||||
var readOnlyField2: Int {
|
||||
get {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
var normalField : Int
|
||||
|
||||
subscript(x: Int) -> Int {
|
||||
get {
|
||||
return 0
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
subscript(x: Int, y : Int) -> Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
var hasWillSet1 : Int {
|
||||
willSet(newValue) { }
|
||||
}
|
||||
|
||||
var hasWillSet2 : Int {
|
||||
willSet { }
|
||||
}
|
||||
|
||||
var hasDidSet1 : Int {
|
||||
didSet(oldValue) { }
|
||||
}
|
||||
|
||||
var hasDidSet2 : Int {
|
||||
didSet { }
|
||||
}
|
||||
|
||||
var hasBoth : Int {
|
||||
willSet { }
|
||||
|
||||
didSet { }
|
||||
}
|
||||
}
|
||||
@@ -193,3 +193,39 @@
|
||||
| expressions.swift:93:18:93:18 | DeclRefExpr |
|
||||
| expressions.swift:93:29:93:29 | DeclRefExpr |
|
||||
| expressions.swift:93:29:93:29 | PointerToPointerExpr |
|
||||
| expressions.swift:99:14:99:14 | IntegerLiteralExpr |
|
||||
| expressions.swift:106:12:106:12 | IntegerLiteralExpr |
|
||||
| expressions.swift:112:14:112:14 | IntegerLiteralExpr |
|
||||
| expressions.swift:120:14:120:14 | IntegerLiteralExpr |
|
||||
| expressions.swift:126:12:126:12 | IntegerLiteralExpr |
|
||||
| expressions.swift:131:3:131:3 | DeclRefExpr |
|
||||
| expressions.swift:131:3:131:6 | MemberRefExpr |
|
||||
| expressions.swift:131:3:131:22 | AssignExpr |
|
||||
| expressions.swift:131:22:131:22 | IntegerLiteralExpr |
|
||||
| expressions.swift:132:11:132:11 | DeclRefExpr |
|
||||
| expressions.swift:132:11:132:14 | LoadExpr |
|
||||
| expressions.swift:132:11:132:14 | MemberRefExpr |
|
||||
| expressions.swift:133:11:133:11 | DeclRefExpr |
|
||||
| expressions.swift:133:11:133:11 | LoadExpr |
|
||||
| expressions.swift:133:11:133:14 | MemberRefExpr |
|
||||
| expressions.swift:134:11:134:11 | DeclRefExpr |
|
||||
| expressions.swift:134:11:134:11 | LoadExpr |
|
||||
| expressions.swift:134:11:134:14 | MemberRefExpr |
|
||||
| expressions.swift:135:3:135:3 | DeclRefExpr |
|
||||
| expressions.swift:135:3:135:6 | MemberRefExpr |
|
||||
| expressions.swift:135:3:135:20 | AssignExpr |
|
||||
| expressions.swift:135:20:135:20 | IntegerLiteralExpr |
|
||||
| expressions.swift:136:11:136:11 | DeclRefExpr |
|
||||
| expressions.swift:136:11:136:14 | LoadExpr |
|
||||
| expressions.swift:136:11:136:14 | MemberRefExpr |
|
||||
| expressions.swift:137:3:137:3 | DeclRefExpr |
|
||||
| expressions.swift:137:3:137:3 | InOutExpr |
|
||||
| expressions.swift:137:3:137:7 | SubscriptExpr |
|
||||
| expressions.swift:137:3:137:11 | AssignExpr |
|
||||
| expressions.swift:137:6:137:6 | IntegerLiteralExpr |
|
||||
| expressions.swift:137:11:137:11 | IntegerLiteralExpr |
|
||||
| expressions.swift:138:10:138:10 | DeclRefExpr |
|
||||
| expressions.swift:138:10:138:10 | LoadExpr |
|
||||
| expressions.swift:138:10:138:17 | SubscriptExpr |
|
||||
| expressions.swift:138:13:138:13 | IntegerLiteralExpr |
|
||||
| expressions.swift:138:16:138:16 | IntegerLiteralExpr |
|
||||
|
||||
@@ -91,3 +91,49 @@ class ToPtr {}
|
||||
|
||||
let opaque = Unmanaged.passRetained(ToPtr()).toOpaque()
|
||||
Unmanaged<ToPtr>.fromOpaque(opaque)
|
||||
|
||||
struct HasProperty {
|
||||
var settableField: Int {
|
||||
set { }
|
||||
get {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
// A field can be marked as read-only by dirctly implementing
|
||||
// the getter between the braces.
|
||||
var readOnlyField1: Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Or by adding an access declaration
|
||||
var readOnlyField2: Int {
|
||||
get {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
var normalField : Int
|
||||
|
||||
subscript(x: Int) -> Int {
|
||||
get {
|
||||
return 0
|
||||
}
|
||||
set { }
|
||||
}
|
||||
|
||||
subscript(x: Int, y : Int) -> Int {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
func testProperties(hp : inout HasProperty) -> Int {
|
||||
hp.settableField = 42
|
||||
var x = hp.settableField
|
||||
var y = hp.readOnlyField1
|
||||
var z = hp.readOnlyField2
|
||||
hp.normalField = 99
|
||||
var w = hp.normalField
|
||||
hp[1] = 2
|
||||
return hp[3, 4]
|
||||
}
|
||||
99
swift/ql/test/extractor-tests/expressions/semantics.expected
Normal file
99
swift/ql/test/extractor-tests/expressions/semantics.expected
Normal file
@@ -0,0 +1,99 @@
|
||||
| expressions.swift:7:11:7:11 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:7:18:7:18 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:7:18:7:18 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:7:19:7:19 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:7:21:7:21 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:15:9:15:9 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:15:11:15:11 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:16:19:16:19 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:20:6:20:6 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:21:6:21:6 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:27:13:27:13 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:35:1:35:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:35:7:35:7 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:35:7:35:12 | SubscriptExpr | OrdinarySemantics |
|
||||
| expressions.swift:38:3:38:3 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:41:1:41:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:42:12:42:12 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:42:14:42:14 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:42:16:42:16 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:44:1:44:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:45:12:45:12 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:45:14:45:14 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:45:16:45:16 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:47:1:47:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:47:19:47:19 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:47:22:47:22 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:47:24:47:24 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:48:1:48:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:48:12:48:12 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:48:15:48:15 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:48:17:48:17 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:59:1:59:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:59:26:59:26 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:60:1:60:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:60:23:60:23 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:60:35:60:35 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:60:59:60:59 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:64:8:64:8 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:64:10:64:10 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:73:5:73:5 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:73:5:73:5 | MemberRefExpr | DirectToStorage |
|
||||
| expressions.swift:73:10:73:10 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:77:7:77:7 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:83:15:83:15 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:84:5:84:5 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:84:5:84:13 | MemberRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:87:1:87:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:88:1:88:1 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:88:1:88:6 | SubscriptExpr | OrdinarySemantics |
|
||||
| expressions.swift:92:24:92:24 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:92:37:92:37 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:92:46:92:46 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:93:18:93:18 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:93:29:93:29 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:131:3:131:3 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:131:3:131:6 | MemberRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:132:11:132:11 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:132:11:132:14 | MemberRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:133:11:133:11 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:133:11:133:14 | MemberRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:134:11:134:11 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:134:11:134:14 | MemberRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:135:3:135:3 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:135:3:135:6 | MemberRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:136:11:136:11 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:136:11:136:14 | MemberRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:137:3:137:3 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:137:3:137:7 | SubscriptExpr | OrdinarySemantics |
|
||||
| expressions.swift:138:10:138:10 | DeclRefExpr | OrdinarySemantics |
|
||||
| expressions.swift:138:10:138:17 | SubscriptExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | DeclRefExpr | OrdinarySemantics |
|
||||
| file://:0:0:0:0 | MemberRefExpr | DirectToStorage |
|
||||
| file://:0:0:0:0 | MemberRefExpr | DirectToStorage |
|
||||
| file://:0:0:0:0 | MemberRefExpr | DirectToStorage |
|
||||
| file://:0:0:0:0 | MemberRefExpr | DirectToStorage |
|
||||
28
swift/ql/test/extractor-tests/expressions/semantics.ql
Normal file
28
swift/ql/test/extractor-tests/expressions/semantics.ql
Normal file
@@ -0,0 +1,28 @@
|
||||
import swift
|
||||
|
||||
from Expr e, string semantics
|
||||
where
|
||||
exists(DeclRefExpr ref | ref = e |
|
||||
ref.hasDirectToImplementationSemantics() and semantics = "DirectToImplementation"
|
||||
or
|
||||
ref.hasDirectToStorageSemantics() and semantics = "DirectToStorage"
|
||||
or
|
||||
ref.hasOrdinarySemantics() and semantics = "OrdinarySemantics"
|
||||
)
|
||||
or
|
||||
exists(SubscriptExpr sub | sub = e |
|
||||
sub.hasDirectToImplementationSemantics() and semantics = "DirectToImplementation"
|
||||
or
|
||||
sub.hasDirectToStorageSemantics() and semantics = "DirectToStorage"
|
||||
or
|
||||
sub.hasOrdinarySemantics() and semantics = "OrdinarySemantics"
|
||||
)
|
||||
or
|
||||
exists(MemberRefExpr memberRef | memberRef = e |
|
||||
memberRef.hasDirectToImplementationSemantics() and semantics = "DirectToImplementation"
|
||||
or
|
||||
memberRef.hasDirectToStorageSemantics() and semantics = "DirectToStorage"
|
||||
or
|
||||
memberRef.hasOrdinarySemantics() and semantics = "OrdinarySemantics"
|
||||
)
|
||||
select e, semantics
|
||||
@@ -608,6 +608,13 @@ cfg.swift:
|
||||
# 89| NilLiteralExpr
|
||||
#-----| -> AssignExpr
|
||||
|
||||
# 99| enter AccessorDecl
|
||||
|
||||
# 99| exit AccessorDecl
|
||||
|
||||
# 99| exit AccessorDecl (normal)
|
||||
#-----| -> exit AccessorDecl
|
||||
|
||||
# 100| enter ConstructorDecl
|
||||
#-----| -> DeclRefExpr
|
||||
|
||||
@@ -3877,6 +3884,13 @@ cfg.swift:
|
||||
# 348| IntegerLiteralExpr
|
||||
#-----| -> BinaryExpr
|
||||
|
||||
# 353| enter AccessorDecl
|
||||
|
||||
# 353| exit AccessorDecl
|
||||
|
||||
# 353| exit AccessorDecl (normal)
|
||||
#-----| -> exit AccessorDecl
|
||||
|
||||
# 354| enter ConstructorDecl
|
||||
#-----| -> DeclRefExpr
|
||||
|
||||
@@ -4173,6 +4187,31 @@ cfg.swift:
|
||||
# 386| VarargExpansionExpr
|
||||
#-----| -> CallExpr
|
||||
|
||||
# 394| TBD (YieldStmt)
|
||||
#-----| -> exit AccessorDecl (normal)
|
||||
|
||||
# 394| enter AccessorDecl
|
||||
|
||||
# 394| enter AccessorDecl
|
||||
|
||||
# 394| enter AccessorDecl
|
||||
#-----| -> TBD (YieldStmt)
|
||||
|
||||
# 394| exit AccessorDecl
|
||||
|
||||
# 394| exit AccessorDecl
|
||||
|
||||
# 394| exit AccessorDecl
|
||||
|
||||
# 394| exit AccessorDecl (normal)
|
||||
#-----| -> exit AccessorDecl
|
||||
|
||||
# 394| exit AccessorDecl (normal)
|
||||
#-----| -> exit AccessorDecl
|
||||
|
||||
# 394| exit AccessorDecl (normal)
|
||||
#-----| -> exit AccessorDecl
|
||||
|
||||
# 395| enter ConstructorDecl
|
||||
#-----| -> IntegerLiteralExpr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user