Commit Graph

13744 Commits

Author SHA1 Message Date
Ian Lynagh
b7a0b56e41 Kotlin: Add a this. 2022-05-10 19:51:31 +01:00
Ian Lynagh
8a89251c4f Kotlin: Tweak dbscheme 2022-05-10 19:51:31 +01:00
Ian Lynagh
3662611b04 Kotlin: Fix compilation_finished upgrade script 2022-05-10 19:51:31 +01:00
Ian Lynagh
b5572422df Kotlin: Autoformat 2022-05-10 19:51:31 +01:00
Ian Lynagh
ab2946cf10 Kotlin: Add release notes 2022-05-10 19:51:31 +01:00
Ian Lynagh
e1d832c2e9 Upgrades: All old diagnostics are generated by the Java extractor 2022-05-10 19:51:31 +01:00
Tamas Vajk
26dfca8010 Add DB upgrade scripts for diagnostics and compilation_finished 2022-05-10 19:51:31 +01:00
Tony Torralba
a5a31db835 Rename AnyEqualsExpr and AnyNotEqualsExpr 2022-05-10 19:51:31 +01:00
Tony Torralba
0e3db78eba Make GeneratedFileMarker an instance of JavadocElement 2022-05-10 19:51:31 +01:00
Tamas Vajk
4f256d2958 Change LambdaExpr::asMethod to return the big-arity invoke instead of the wrapper 2022-05-10 19:51:31 +01:00
Ian Lynagh
af3bc4f44d Kotlin: Apply review feedback 2022-05-10 19:51:31 +01:00
Ian Lynagh
2e3d2b8e11 Java: Use the Diagnostics class in DiagnosticsReporting.qll
We shouldn't use database types/tables directly in src/
2022-05-10 19:51:31 +01:00
Tamas Vajk
464d13775d Add QL doc for LambdaExpr::isKotlinFunctionN 2022-05-10 19:51:31 +01:00
Ian Lynagh
1151f79eca Kotlin: Apply some review feedback 2022-05-10 19:51:31 +01:00
Ian Lynagh
726a005cc2 Update java/ql/lib/semmle/code/java/Expr.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
2022-05-10 19:51:31 +01:00
Ian Lynagh
1a36b1ab53 Kotlin: Format queries 2022-05-10 19:51:31 +01:00
Ian Lynagh
efe3c0d1ea Kotlin: Performance tweak 2022-05-10 19:51:30 +01:00
Ian Lynagh
653e74d181 Kotlin: Performance tweak 2022-05-10 19:51:30 +01:00
Ian Lynagh
b9be79473a Kotlin: Performance tweak 2022-05-10 19:51:30 +01:00
Ian Lynagh
65afd0d776 Kotlin: Performance tweak 2022-05-10 19:51:30 +01:00
Ian Lynagh
f5c0b0ebfe Kotlin: Performance tweak 2022-05-10 19:51:30 +01:00
Ian Lynagh
e0053cd471 Kotlin: qlformat a query 2022-05-10 19:51:30 +01:00
Ian Lynagh
bfe36558c1 Java/Kotlin: Update stats 2022-05-10 19:51:30 +01:00
Ian Lynagh
43035aef2d Java: Add an upgrade script 2022-05-10 19:51:30 +01:00
Ian Lynagh
4a6c2c2914 Revert "Java: Add an upgrade script"
This reverts commit c964d3262bb344d6c8e55d9bf69ffe2291b2f2cf.
2022-05-10 19:51:30 +01:00
Tamas Vajk
e8b3bf55fa Code quality improvements 2022-05-10 19:51:30 +01:00
Tamas Vajk
749d606f84 Fix expected file of useless null check test 2022-05-10 19:51:30 +01:00
Tamas Vajk
465a85bb8c Explicitly check if a when expression is in the expected &&/|| form 2022-05-10 19:51:30 +01:00
Tamas Vajk
3af8273620 Modify extraction of &&/|| to resugar it from when expression 2022-05-10 19:51:30 +01:00
Tamas Vajk
d33224a058 Add test case for missing CFG successor 2022-05-10 19:51:30 +01:00
Tamas Vajk
b66a3141f6 Extract functions using their name from JvmName annotation 2022-05-10 19:51:30 +01:00
Tamas Vajk
a24753f552 Extract final modifier on local variables 2022-05-10 19:51:30 +01:00
Tamas Vajk
4efb87a7dd Extract enum entry initializers 2022-05-10 19:51:30 +01:00
Ian Lynagh
2647a45239 Kotlin: Fix TypeVariableHidesType performance regression 2022-05-10 19:51:30 +01:00
Tamas Vajk
fc5229a0a5 Extract type access expression for static field access in initializer 2022-05-10 19:51:29 +01:00
Tamas Vajk
c6a75957e9 Fix expected files, fix type access extraction of file level static declarations 2022-05-10 19:51:29 +01:00
Tamas Vajk
1e529b2563 Add missing type access expression for static field accesses 2022-05-10 19:51:29 +01:00
Tamas Vajk
246f228a3b Add static field access test 2022-05-10 19:51:29 +01:00
Tamas Vajk
f43296a157 Extract type access for enum value access 2022-05-10 19:51:29 +01:00
Tamas Vajk
b5c8d29e40 Extract enum field declarations 2022-05-10 19:51:29 +01:00
Tamas Vajk
d6cbcdc847 Extract type access expression for parameter types 2022-05-10 19:51:29 +01:00
Tamas Vajk
f557719fe5 Extract type access expression for function return types 2022-05-10 19:51:29 +01:00
Tamas Vajk
dcac285a99 Add type access tests 2022-05-10 19:51:29 +01:00
Chris Smowton
7ef9420bfd Accept test changes 2022-05-10 19:51:29 +01:00
Chris Smowton
23e3bbea73 Fix: don't treat local classes as unspecialised
This shouldn't matter either way since they can't be subject to external references
2022-05-10 19:51:29 +01:00
Chris Smowton
4477482990 Share a class instance, not just a label 2022-05-10 19:51:29 +01:00
Chris Smowton
11fed0b4f8 Adjust test expectations 2022-05-10 19:51:29 +01:00
Chris Smowton
d63124a761 Extract a generic specialisation using its own type parameters in the same order like an unbound type
This replicates an oddity in the Java extractor that it doesn't differentiate a specialisation Generic<T1, T2, ...> from the unbound type, if T1, T2, ... are Generic's declared type variables occurring in the same order. For example, in `class MyList<T> { void addAll(MyList<T> param) { ... } }`, the type of `param` is an instantiated type, but
gets extracted as an unbound type. This commit can be reverted (except for the improvement to isUnspecialised) if/when that is fixed.
2022-05-10 19:51:29 +01:00
Chris Smowton
f3bd89a5cf Adjust test expectations 2022-05-10 19:51:29 +01:00
Chris Smowton
375199508e Always extract static initializers if a class has static members
This may not be necessary for anonymous objects, but it is certainly unrelated to `init { ... }` blocks.
2022-05-10 19:51:29 +01:00