Commit Graph

4303 Commits

Author SHA1 Message Date
Paolo Tranquilli
8a36a2b563 Merge pull request #9912 from github/redsun82/swift-human-readable-trap-prefixes
Swift: make trap key prefixes readable
2022-07-28 14:34:57 +02:00
Paolo Tranquilli
d547a417c9 Swift: accept new test results 2022-07-28 12:57:12 +02:00
Paolo Tranquilli
cb006900cd Merge branch 'main' into redsun82/swift-deduplicate-vardecls 2022-07-28 12:55:31 +02:00
Paolo Tranquilli
7d7966e711 Swift: make trap key prefixes readable
This replaces numeric tag-based prefixes with the actual tag name.
While this means in general slightly larger trap files, it aids
debugging them for a human.

In the future we can make this conditional on some kind of trap debug
option, but for the moment it does not seem detrimental.
2022-07-28 12:43:30 +02:00
Paolo Tranquilli
b491884996 Merge pull request #9910 from github/redsun82/swift-no-cleanup-on-integration-tests
Swift: add `--no-cleanup` to integration tests
2022-07-28 12:41:53 +02:00
Paolo Tranquilli
76ea63ffbe Swift: deduplicate VarDecl
Deduplication of `ConcreteVarDecl` is triggered only if its
`DeclContext` is not local. This avoids a mangled name conflict.

Also added more thourough tests for `ConcreteVarDecl` and `ParamDecl`.
2022-07-28 12:28:52 +02:00
Paolo Tranquilli
ab1370cc8f Swift: add --no-cleanup to integration tests 2022-07-28 11:19:45 +02:00
Geoffrey White
6cd6f74be9 Swift: Repair predicate lost in merge. 2022-07-28 10:13:04 +01:00
Geoffrey White
72fd7179f6 Merge branch 'main' into stringlengthconflation6 2022-07-28 10:01:28 +01:00
Geoffrey White
e5342867c6 Swift: Add a note to the qhelp. 2022-07-28 09:52:33 +01:00
Paolo Tranquilli
457ce3d884 Swift: fix derived IPA type properties
Also rename `IpaTypes.qll` to `Ipa.qll`
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
f81abe40c4 Swift: disambuigate Cfg test order 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
18b9a2fa6e Swift: accept tests 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
95df751425 Swift: new toString for ExprPattern 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
954047c6ab Swift: accept test changes 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
60795fc652 Swift: fix codescanning warnings 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
8b13adbb93 Swift: IPA layer tweaks 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
6abd4a6a29 Swift: fix QL libraries 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
c578505ae0 Swift: specialize Ipa <-> Db conversions 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
a16d5f72d1 Swift: cache equivalent of asDbInstance
Which is now a predicate in the `IpaTypes.qll` file (where `Cached`
was also renamed to `Ipa`).
2022-07-28 10:26:11 +02:00
Paolo Tranquilli
ef09031cf9 Swift: fix autopep8 and codegen 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
47f26e6029 Swift: fix codegen unit tests 2022-07-28 10:26:11 +02:00
Paolo Tranquilli
10976bbbab Swift: use IPA layer in generated classes 2022-07-28 10:26:10 +02:00
Paolo Tranquilli
ea0725525b Swift: first IPA layer 2022-07-28 10:26:10 +02:00
Paolo Tranquilli
9b26921cb6 Control flow: add order disambuigation customization 2022-07-28 09:11:42 +02:00
Geoffrey White
fe69bbf17c Swift: It turns out NSString.length always exactly matches String.utf16.count. 2022-07-27 17:54:57 +01:00
Geoffrey White
70ca37a3d0 Swift: Model utf8, utf16 a\nd unicodeScalars sources. 2022-07-27 17:39:04 +01:00
Geoffrey White
89d5bbb8e0 Swift: Generalize the flow states in this query. 2022-07-27 17:39:01 +01:00
Geoffrey White
9e773302ed Swift: Extend test cases. 2022-07-27 17:39:01 +01:00
Paolo Tranquilli
ebf650c0c0 Control Flow: add more ordering for edges 2022-07-27 15:01:17 +02:00
Paolo Tranquilli
42f462504e Merge branch 'main' into redsun82/swift-file-label-caching 2022-07-26 15:20:27 +02:00
Paolo Tranquilli
fe73601a4e Merge pull request #9805 from github/redsun82/swift-type-repr-collapse
Swift: collapse `TypeRepr` hierarchy
2022-07-25 09:31:41 +02:00
Paolo Tranquilli
77401ded4e Swift: reflow comment 2022-07-22 13:54:32 +02:00
Paolo Tranquilli
7e67338fb5 Update swift/extractor/infra/SwiftDispatcher.h
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
2022-07-22 13:34:11 +02:00
Jeroen Ketema
c2b7300709 Merge pull request #9848 from geoffw0/stringlengthconflation5
Swift: More improvements for the string length conflation query
2022-07-20 14:05:05 +02:00
Paolo Tranquilli
3527897eff Swift: make type optional in TypeRepr
A type representation may not have a type in unresolved things, which
for example pop up in inactive `#if` clauses.
2022-07-20 09:13:34 +02:00
Geoffrey White
541df9b550 Swift: Remove TODO comment. We have a test for this problem now. 2022-07-18 14:26:12 +01:00
Geoffrey White
336548f746 Swift: Improve comments. 2022-07-18 14:24:16 +01:00
Geoffrey White
9474e63faf Swift: Clean up isSink (4 - move common code out). 2022-07-18 14:24:15 +01:00
Geoffrey White
b136790efd Swift: Clean up isSink (3 - rename f -> funcDecl and move that out as well; in the other two cases this variable didn't exist, now it does). 2022-07-18 14:24:14 +01:00
Geoffrey White
0bd94a6307 Swift: Clean up isSink (2 - rename methodName -> funcName and move that out as well). 2022-07-18 14:24:13 +01:00
Geoffrey White
4854679a40 Swift: Clean up isSink (1 - move common variables to an outer exists). 2022-07-18 14:24:13 +01:00
Geoffrey White
39fb714ad1 Swift: Add test with substring declared differently. 2022-07-18 14:24:12 +01:00
Paolo Tranquilli
e1bd4a78ff Merge branch 'main' into redsun82/swift-type-repr-collapse 2022-07-18 14:05:43 +02:00
Paolo Tranquilli
10b7b1f183 Merge branch 'main' into redsun82/swift-file-label-caching 2022-07-18 14:02:57 +02:00
Paolo Tranquilli
98fc8812fc Merge 'main' into redsun82/swift-extraction 2022-07-18 11:55:21 +02:00
Paolo Tranquilli
c779936ee8 Swift: commit forgotten files 2022-07-18 11:19:40 +02:00
Paolo Tranquilli
c08c3955d6 Swift: add UnresolvedPatternExpr test 2022-07-18 10:37:54 +02:00
Paolo Tranquilli
78fc356feb Swift: address review comments 2022-07-18 10:29:20 +02:00
Paolo Tranquilli
5e74df3882 Swift: cache file paths
This required a bit of a generalization of `TrapLabelStore` to not
work only with pointers.
2022-07-14 16:32:33 +02:00