Paolo Tranquilli
f539be33d5
Merge pull request #9697 from github/redsun82/swift-stop-stub-reverts
...
Swift: fix stub revert prevention
2022-06-24 09:32:29 +02:00
Paolo Tranquilli
a9bd784ba2
Swift: fix stub revert prevention
...
It turns out the threshold of 5 lines for stub modification detection
was too strict: in case of a long class name the QL formatter will put
the closing brace of the empty class definition on a new line, leading
to codegen fail with an error thinking the stub was modified.
On the other side of things, also adding a base to a stub class was not
being detected as a modification.
Now the modification test is slightly smarter. If the stub still marked
as generated and
* has more than 6 lines, or
* the contents does not match a regexp aproximation of a plain stub
then codegen will abort. The test will still avoid reading the whole
contents of all the stubs.
2022-06-24 09:02:40 +02:00
thiggy1342
6ea1aad5fc
more style fixes
2022-06-23 22:57:51 -04:00
thiggy1342
ce2edd4b28
style tweaks
2022-06-24 02:46:48 +00:00
thiggy1342
ca074e2275
add qhelp file
2022-06-24 02:19:06 +00:00
thiggy1342
cf36333082
forgot to finish this test
2022-06-24 02:18:48 +00:00
thiggy1342
45dd38df6e
polish up dataflow query
2022-06-24 01:50:20 +00:00
Ian Lynagh
eb1b3f801d
Merge pull request #9689 from igfoo/igfoo/makeprivate
...
Kotlin: Make some more methods private
2022-06-23 21:28:07 +01:00
Ian Lynagh
bee703a870
Kotlin: Inline away useFunctionCommon
2022-06-23 21:23:21 +01:00
Chris Smowton
a124d83265
Autoformat
2022-06-23 20:13:27 +01:00
Ian Lynagh
3934491dcc
Kotlin: Refactor useFunction*
...
They now work in a way more similar to other families of functions we
have.
2022-06-23 19:19:47 +01:00
Asger F
f5a19a1013
JS: Fix unused variable FP in template placeholders
2022-06-23 19:26:32 +02:00
Geoffrey White
1a980c94a0
Swift: Query description.
2022-06-23 18:13:48 +01:00
Ian Lynagh
ab19d8c3c3
Kotlin: Move useFunctionCommon
2022-06-23 17:59:28 +01:00
Brandon Stewart
caeef68bde
Update ActiveRecord.qll
2022-06-23 12:31:05 -04:00
Brandon Stewart
173bea2579
Update ActiveRecord.qll
2022-06-23 12:18:26 -04:00
Brandon Stewart
fa622f551a
Update ruby/ql/lib/codeql/ruby/frameworks/ActiveRecord.qll
...
Co-authored-by: Alex Ford <alexrford@users.noreply.github.com >
2022-06-23 12:16:50 -04:00
Mathias Vorreiter Pedersen
71efffd79b
Merge pull request #9691 from rdmarsh2/rdmarsh2/swift/ssa-perf-1
...
Swift: remove check for inout params in SSA gen
2022-06-23 17:16:38 +01:00
Mathias Vorreiter Pedersen
998a75e768
Merge pull request #9690 from github/redsun82/swift-stop-stub-reverts
...
Swift: prevent accidental revert of modified stub
2022-06-23 17:13:52 +01:00
Geoffrey White
911d30bd9a
Swift: Proper query message.
2022-06-23 17:12:02 +01:00
Robert Marsh
946d0358c9
Swift: remove check for inout params in SSA gen
...
This check is unnecessary since it's enforced by the compiler, and is
causing a bad join order.
2022-06-23 15:59:34 +00:00
Paolo Tranquilli
ad38cf2026
Swift: prevent accidental revert of modified stub
...
If one modifies a QL stub but forgets to remove the `// generated`
header comment, codegen will now abort with an error rather than
silently reverting the change.
This is based on the rough heuristic of just counting the lines. If any
change is done to the stub class, the number of lines is bound to be
5 or more.
2022-06-23 17:49:21 +02:00
Paolo Tranquilli
a6ae6cfad0
Merge pull request #9688 from github/redsun82/swift-autopep8
...
Swift: autopep8 codegen
2022-06-23 17:49:09 +02:00
Ian Lynagh
bd8a8d00aa
Kotlin: Make some more methods private
2022-06-23 16:44:06 +01:00
Chris Smowton
b5010337a4
Avoid extracting needless obinit methods where we're only extracting a class' outline.
2022-06-23 16:26:54 +01:00
Chris Smowton
3cf7f96298
Ensure <obinit>'s return type is void not Unit
2022-06-23 16:26:54 +01:00
Chris Smowton
af5230349b
Kotlin: reintroduce obinit when we have multiple secondary constructors and no primary
...
This avoids DB inconsistencies because complex initialisers are extracted to more than one function.
2022-06-23 16:26:54 +01:00
Paolo Tranquilli
7334b4e03a
Swift: autopep8 all python files
...
Additionally set up a pre-commit hook and a CI check for that.
2022-06-23 17:13:56 +02:00
Geoffrey White
64d7296847
Swift: Remove redundant cast.
2022-06-23 16:04:26 +01:00
Geoffrey White
3291029e6d
Swift: Address further review comments.
2022-06-23 16:00:56 +01:00
Geoffrey White
ebcb1e9448
Swift: Clean up other uses of toString.
2022-06-23 15:53:55 +01:00
Chris Smowton
1aae3c5f5e
Fix whenexpr test
...
Prior to Kotlin 1.7 the gratuitous `?` was ignored for typing purposes; now it yields a `String?`. We should make the test work everywhere by using a real nullable type.
2022-06-23 15:34:40 +01:00
Chris Smowton
e64a8bc79a
Use binary names not fqnames for uniquing IrDeclarations
...
Otherwise we fall into the trap of confusing the two overloads of `MapsKt.iterator` which have differing jvmnames.
2022-06-23 15:34:40 +01:00
Chris Smowton
57ea34d3ff
Unique external classes/functions by fqname
...
Previously we used the IrDeclaration itself, but in Kotlin 1.7 this can be ambiguous because we can get more than one copy of a class in different modules.
2022-06-23 15:34:40 +01:00
Chris Smowton
8c57308661
Prevent extracting hidden functions
...
I'm not sure how these looked in 1.6 and below yet, but in 1.7 they appear with visibility = public, but a descriptor field set to indicate they have a name clash with a 'real' function.
2022-06-23 15:34:40 +01:00
Chris Smowton
2b2c384933
Kotlin: Move from 1.7.0-RC to 1.7.0
2022-06-23 15:34:40 +01:00
Chris Smowton
4899aabb05
Switch to using Kotlin 1.7 by default
2022-06-23 15:34:40 +01:00
Chris Smowton
45c85228bd
Implement Kotlin 1.7 support
...
- Implement getIrStubFromDescriptor for Kotlin 1.7
- Stop using ClassSymbol.signature, which is now only populated for classes built from Kotlin, and noteworthily is null for primitive and other internally-synthesised types.
2022-06-23 15:34:40 +01:00
Mathias Vorreiter Pedersen
43d449f1f7
Merge pull request #9687 from github/redsun82/swift-codegen-tag-to-pragma
...
Swift: tag -> pragma in codegen
2022-06-23 15:21:58 +01:00
Asger F
56786790fc
Merge pull request #9682 from github/release-prep/2.10.0
...
Release preparation for version 2.10.0
codeql-cli/v2.10.0
2022-06-23 16:09:48 +02:00
Ian Lynagh
3b2b884f09
Merge pull request #9683 from igfoo/igfoo/getDiagnosticLocation
...
Kotlin: Remove unused function getDiagnosticLocation
2022-06-23 14:09:00 +01:00
Paolo Tranquilli
8d4637ddfd
Swift: tag -> pragma in codegen
...
For the use the former tags are meant for, pragma is a more
meaningful name. It now also accepts both strings and lists of strings.
2022-06-23 14:52:21 +02:00
Anders Schack-Mulligen
dc517a758e
Autoformat
2022-06-23 14:44:40 +02:00
Anders Schack-Mulligen
4a317a25d3
Dataflow: Sync.
2022-06-23 14:34:52 +02:00
Anders Schack-Mulligen
c27290563a
Dataflow: Perf fix, avoid node scans.
2022-06-23 14:34:05 +02:00
Paolo Tranquilli
0957f63cc7
Swift: update codegen workflow to include all files
2022-06-23 14:31:48 +02:00
Paolo Tranquilli
a9877ed2fd
Swift: split generated C++ files by directory
2022-06-23 14:24:03 +02:00
Paolo Tranquilli
b2ebf63d2e
Swift: split generated C++ code into .h and .cpp
2022-06-23 14:22:58 +02:00
Asger F
d94010c244
Grammar: report -> reports
2022-06-23 14:17:52 +02:00
Asger F
d3df2033f0
Update cpp/ql/lib/change-notes/released/0.3.0.md
2022-06-23 14:11:11 +02:00