Geoffrey White
4cf40ed259
Swift: Add a test case for withMutableCharacters.
2023-10-23 23:30:19 +01:00
Paolo Tranquilli
f22d60f011
Swift: clean up VarDecl, NamedPattern and SwitchStmt interactions
...
* `variables` under `CaseStmt` are now AST children, which solves
orphan `VarDecl`s in that case
* reordered `CaseStmt` AST children to be `labels > variables > body`
(was `body > labels`)
* made `NamedPattern::getVarDecl` an extracted property instead of
`getName`
* The above led to duplicate DB entities because of a quirk in the
Swift compiler code. This is solved by tweaking the extraction of
`variables` under `CaseStmt` to not use `getCaseBodyVariables`.
2023-10-23 17:36:42 +02:00
Geoffrey White
b93442a2b6
Merge pull request #14523 from geoffw0/appendingformat
...
Swift: Model StringProtocol.appendingformat and String.decodecstring
2023-10-17 18:04:29 +01:00
Robert Marsh
53e80e0f27
Merge pull request #14398 from rdmarsh2/rdmarsh2/swift/autoclosure-cfg
...
Swift: add CFG for normal autoclosures
2023-10-17 11:50:24 -04:00
Mathias Vorreiter Pedersen
68f2501bf0
Merge pull request #14496 from geoffw0/memberinittest
...
Swift: Add data flow tests for member initialization.
2023-10-17 12:35:07 +01:00
Geoffrey White
5ffb773568
Swift: Explore instantiated / not instantiated classes.
2023-10-17 11:30:03 +01:00
Geoffrey White
2679d1fdb5
Swift: Add models.
2023-10-16 21:40:38 +01:00
Geoffrey White
451d779f4a
Swift: Test String.decodeCString.
2023-10-16 21:22:03 +01:00
Geoffrey White
459b006244
Swift: Test StringProtocol.appendingFormat.
2023-10-16 21:22:03 +01:00
Geoffrey White
0509c0fdf3
Swift: Effect on dataflow tests.
2023-10-16 18:28:50 +01:00
Geoffrey White
1f92267786
Swift: Sort out identical files situation.
2023-10-16 11:26:12 +01:00
Geoffrey White
890b9d59ed
Swift: Fix line numbers.
2023-10-16 11:09:54 +01:00
Geoffrey White
225a9fe2d8
Merge branch 'main' into implicitflow
2023-10-16 11:02:34 +01:00
Geoffrey White
0e1da37379
Revert "Swift: Hide OpenExistentialExpr from the AST instead."
...
This reverts commit 9ad1749957 .
2023-10-16 10:49:39 +01:00
Geoffrey White
613c7b24b5
Swift: Model .base, withUTF8(_:).
2023-10-16 10:17:32 +01:00
Geoffrey White
0bc24b8641
Swift: Model replaceSubrange more generally.
2023-10-16 10:17:32 +01:00
Geoffrey White
c6f2a2936b
Swift: Widen the StringProtocol model.
2023-10-16 10:14:43 +01:00
Geoffrey White
dcba1b9913
Swift: Tests for Substring.
2023-10-16 10:14:42 +01:00
Geoffrey White
cea87a53e0
Swift: Fix LocalTaint.expected.
2023-10-13 18:19:26 +01:00
Geoffrey White
4e29ed5ff0
Swift: Model RawRepresentable.
2023-10-13 15:00:49 +01:00
Geoffrey White
228aaee0bf
Swift: Add data flow tests for RawRepresentable, OptionSet.
2023-10-13 14:34:05 +01:00
Geoffrey White
33f83a2089
Swift: Add some failing data flow test cases.
2023-10-13 12:24:43 +01:00
Robert Marsh
dd71204128
Swift: update test expectations for for-in locations
2023-10-12 18:59:36 +00:00
AlexDenisov
6ab2de10e3
Merge pull request #14437 from github/alexdenisov/ignore-unavailable-declarations
...
Swift: skip declarations marked as unavailable
2023-10-12 20:08:18 +02:00
Mathias Vorreiter Pedersen
02f73145d6
Merge pull request #14354 from geoffw0/conversions2
...
Swift: Improve models for Numeric, RangeReplaceableCollection
2023-10-12 11:13:50 +01:00
Alex Denisov
4133284bc8
Swift: skip declarations marked as unavailable
2023-10-11 10:55:49 +02:00
Robert Marsh
dab9a859f3
Merge branch 'main' into rdmarsh2/swift/autoclosure-cfg
2023-10-09 14:21:28 +00:00
Robert Marsh
cb749bd973
Swift: CFG for normal autoclosure exprs
2023-10-06 20:14:49 +00:00
Robert Marsh
661da76838
Swift: add function call autoclosure tests
2023-10-06 19:49:33 +00:00
Geoffrey White
9ad1749957
Swift: Hide OpenExistentialExpr from the AST instead.
2023-10-06 17:55:29 +01:00
Geoffrey White
76db1c5c8b
Swift: Add the same code to the AST test as well.
2023-10-06 17:13:49 +01:00
Geoffrey White
b0c7964ea6
Swift: Add the same code to the CFG test as well.
2023-10-06 10:07:52 +01:00
Geoffrey White
b3185e9519
Swift: Expand the test case.
2023-10-06 09:43:33 +01:00
Geoffrey White
e31ca58a2f
Swift: Post-merge fix.
2023-10-05 15:45:22 +01:00
Geoffrey White
17894db501
Merge branch 'main' into conversions2
2023-10-05 15:33:05 +01:00
Geoffrey White
dcd88100f0
Swift: Minor corrections, update parse.expected.
2023-10-05 11:11:52 +01:00
Geoffrey White
fa10dbea9f
Swift: Support mode flags through NSString.CompareOptions.
2023-10-05 10:45:59 +01:00
Geoffrey White
a052a4e385
Swift: Update to a proper data flow config so we can add implicit reads from arrays at the sink.
2023-10-05 10:45:58 +01:00
Geoffrey White
cdc0d1fff1
Swift: Check the options flag contains .regularExpression.
2023-10-05 10:45:58 +01:00
Geoffrey White
b5ff104a00
Swift: Naive model for regular expression evaluations through NSString and StringProtocol methods.
2023-10-04 19:19:29 +01:00
Geoffrey White
5263cccefc
Swift: Bite the bullet and make 'regex' a non-optional field of the regex test, so that we can be confident where we fail to identify them.
2023-10-04 19:19:28 +01:00
Geoffrey White
24c385b1da
Swift: Expand and correct regex tests.
2023-10-04 19:19:28 +01:00
Robert Marsh
00068d6157
Merge branch 'main' into rdmarsh2/swift/for-in
...
Fix conflict in AST test output
2023-10-04 15:58:36 +00:00
Robert Marsh
f7ca8e5b39
Merge pull request #14224 from rdmarsh2/rdmarsh2/swift/nil-coalescing-cfg
...
Swift: CFG and data flow for nil coalescing operator
2023-10-04 09:43:31 -04:00
Geoffrey White
34b33e1577
Merge pull request #14328 from geoffw0/debugdesc
...
Swift: Model .description, .debugDescription more generally
2023-10-03 17:37:22 +01:00
Robert Marsh
497f0aa8ab
Swift: sync test files and update expectation
2023-10-03 14:57:04 +00:00
Robert Marsh
ca722dc74c
Swift: add NilCoalescingTest node to CFG
...
Fixes an issue where a nil-coalescing operation used in a boolean
context would result in no control flow out of the default operand of
the nil-coalescing operator.
2023-10-02 18:07:11 +00:00
Geoffrey White
c61edc13e7
Swift: Model RangeReplaceableCollection initializers.
2023-10-02 11:59:25 +01:00
Geoffrey White
0c534b69eb
Swift: Extend Numeric models.
2023-10-02 11:59:25 +01:00
Geoffrey White
2863a14cd1
Swift: Add more tests for Arrays.
2023-10-02 11:59:24 +01:00