Commit Graph

4392 Commits

Author SHA1 Message Date
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
bfd150a1d3 Swift: Clarify comment. 2023-10-25 16:38:59 +01:00
Geoffrey White
ff15b73250 Swift: Update the change note. 2023-10-25 16:32:59 +01:00
Geoffrey White
4a08ca39d6 Swift: Replace PotentialRegexEval with a more specialized solution. 2023-10-25 16:26:46 +01:00
Mathias Vorreiter Pedersen
11194e574c Swift: Get rid of the unnecessary parameter/argument position for the closure. Instead, we can just reuse the 'this' parameter and argument. 2023-10-25 15:46:10 +01:00
Geoffrey White
354983087e Swift: this.(PotentialRegexEval) -> super. or this. . 2023-10-25 15:25:12 +01:00
Mathias Vorreiter Pedersen
951b6beeb1 Swift: Untangle the confusion between 'getParameter' and 'asParameter'. 2023-10-25 14:44:09 +01:00
Mathias Vorreiter Pedersen
78e08cf63c Swift: Remove irrelevant TODO. 2023-10-25 13:55:07 +01:00
Paolo Tranquilli
fb470e4140 Swift: remove useless commented-out line 2023-10-25 12:15:25 +02: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
Geoffrey White
a3d53ba9ec Merge pull request #14574 from github/geoffw0-patch-2
Swift: Update README.md
2023-10-25 10:56:01 +01:00
Paolo Tranquilli
a245d0019e Swift: tiny cosmetic tweak 2023-10-25 10:56:21 +02: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
d2d70cc782 Swift: Change note. 2023-10-24 16:17:21 +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
Geoffrey White
3bcee63980 Update README.md
Change the Warning to a Note and rephrase.
2023-10-24 15:46:32 +01:00
Mathias Vorreiter Pedersen
862de152a1 Swift: Add required qldoc. 2023-10-24 15:45:17 +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ć
9de3cc703a Swift: add CapturePostUpdateNode
However, this doesn't change any of the test results.
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ć
8115774a7a Swift: Add the capture flow step as part of the normal data flow relation
TODO: see if we need to exclude duplicate SSA steps
2023-10-24 13:56:31 +01:00
Nora Dimitrijević
4e1b44a059 Swift: port simpleAstFlowStep/hasAliasedAccess 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
21a369de13 Swift: Add closure content read-write steps 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
c04654d8f9 Swift: getImmediateBasicBlockDominator/2 should use immediatelyDominates/0. 2023-10-24 13:56:31 +01:00
Nora Dimitrijević
95a7d6559c Swift: initial version of a swift port of most of the java code 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
f597f0272a Update README.md
Turned the warning at the top into a warning box.

Made the section headers consistent.

I was going to add a section, but I realized it belongs somewhere else.  :)
2023-10-24 10:12:20 +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
Paolo Tranquilli
c92519ed6b Merge pull request #14538 from github/redsun82/add-unspecified-element-children
Swift: add children to `UnspecifiedElement`
2023-10-20 12:27:05 +02:00
Dave Bartolomeo
712f7758cf Merge branch 'main' into post-release-prep/codeql-cli-2.15.1 2023-10-19 12:14:07 -04:00
Paolo Tranquilli
d55289bf68 Swift: add children to UnspecifiedElement
This will allow better downgrade scripts in the future.
2023-10-18 16:42:04 +02:00
Alex Denisov
eb3e140008 Swift: remove outdated CLI argument 2023-10-18 14:44:47 +02:00
github-actions[bot]
8dcd8b9e5b Post-release preparation for codeql-cli-2.15.1 2023-10-17 20:24:00 +00:00