Commit Graph

1641 Commits

Author SHA1 Message Date
Mathias Vorreiter Pedersen
93234c0b5c Swift: Add model for 'withVaList' and accept test changes. 2023-10-27 10:21:12 +01:00
Mathias Vorreiter Pedersen
9e2dd09ddc Swift: Accept test regression (caused by no model for 'withVaList'). 2023-10-27 10:20:07 +01:00
Mathias Vorreiter Pedersen
784bb72b33 Swift: Add some more tests. 2023-10-26 17:29:26 +01:00
Mathias Vorreiter Pedersen
96a37f3a3c Swift: Simplify more tests. 2023-10-26 14:55:17 +01:00
Mathias Vorreiter Pedersen
2ad121a8a5 Swift: Simplify test. 2023-10-26 14:46:59 +01:00
Mathias Vorreiter Pedersen
2465cc20f0 Swift: Don't define 'ClosureSelfParameterNode' as the expression node of the closure. 2023-10-26 11:56:27 +01:00
Geoffrey White
82b92c38f9 Swift: Change method types to DataFlow::Node / go ahead with planned deprecations. 2023-10-25 17:11:21 +01:00
Geoffrey White
bf503849ea Swift: Fixup line numbers after merge. 2023-10-25 11:09:13 +01:00
Geoffrey White
bf6e6a1e68 Merge branch 'main' into stringwith 2023-10-25 10:58:25 +01:00
Paolo Tranquilli
9196939384 Swift: canonicalize all VarDecls 2023-10-25 10:38:17 +02:00
Geoffrey White
8a5f3e4825 Swift: Fix an issue with RegexTracking.qll using PotentialRegexEval rather than RegexEval. 2023-10-24 22:49:19 +01:00
Geoffrey White
021ed88a0a Swift: Add a test revealing unevaluated regexs. 2023-10-24 22:42:15 +01:00
Geoffrey White
42a2ec9891 Merge branch 'main' into substring 2023-10-24 17:03:00 +01:00
Geoffrey White
06b1cd939c Merge pull request #14502 from geoffw0/xmlquery
Swift: Model RawRepresentable
2023-10-24 16:25:15 +01:00
Geoffrey White
79f675cdb7 Swift: Fix a model. 2023-10-24 16:17:21 +01:00
Geoffrey White
a5206028b0 Swift: Expand a test to explore why it fails (lack of pointer models and closure capture flow). 2023-10-24 16:17:21 +01:00
Mathias Vorreiter Pedersen
6f37d7c374 Swift: Accept changes in paths. 2023-10-24 15:39:19 +01:00
Mathias Vorreiter Pedersen
56b49a4de3 Swift: Add a closure flow step from the right-hand side of variable declarations to the underlying pattern. 2023-10-24 15:28:28 +01:00
Mathias Vorreiter Pedersen
3d5098aaeb Swift: Add failing test. 2023-10-24 15:28:25 +01:00
Mathias Vorreiter Pedersen
1c298e6001 Swift: Fix 'parameter' -> 'argument' flow into closures. 2023-10-24 15:28:01 +01:00
Mathias Vorreiter Pedersen
310ebe47b3 Swift: Clean up test file. 2023-10-24 15:27:59 +01:00
Nora Dimitrijević
9dbf7e818d Swift: align definition of InputSig slightly closer to Java version
Though there is a regression in the tests, so more work is needed.
2023-10-24 13:56:31 +01:00
Nora Dimitrijević
5418d39a0d Swift: add and accept a few new simple test cases 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
af49a3aa64 Swift: accept new results in old tests 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
3253c0425c Swift: s/getName/getShortName/ in InlineFlowTest.qll 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
050b8e682f Swift: add failing inline expectation test based on closure AST tests. 2023-10-24 13:56:31 +01:00
Geoffrey White
d3063e849e Swift: Model string closure methods. 2023-10-24 12:58:38 +01:00
Geoffrey White
4cf40ed259 Swift: Add a test case for withMutableCharacters. 2023-10-23 23:30:19 +01:00
Paolo Tranquilli
2f0ee12584 Swift: fix patterns/bound_and_unbound.ql test 2023-10-23 17:36:42 +02: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
Paolo Tranquilli
7cc20587ad Codegen: add @qltest.test_with
This allows to group together related AST classes to reuse the same
test source and extraction. For example this is useful for
`EnumDecl/EnumCaseDecl/EnumElementDecl`, where this is applied to.
2023-10-23 14:51:22 +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
990c40c8c8 Swift: Barrier for duplicate results in constant queries, resulting from sources like [1, 2, 3]. 2023-10-16 18:28:51 +01:00
Geoffrey White
6108f787dd Swift: Effect on query tests. 2023-10-16 18:28:51 +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