Commit Graph

85368 Commits

Author SHA1 Message Date
Ian Lynagh
568fba6940 Kotlin 2: Accept some more test changes 2024-03-28 15:28:36 +00:00
Ian Lynagh
0fdc71bf57 Kotlin 2: Accept a test change
For

    if(r != null) {
        val r2: Rectangle = r

in Kotlin 2 mode, there is no IMPLICIT_NOTNULL check in Kotlin 2 mode:

    then: BLOCK type=kotlin.Unit origin=null
      VAR name:r2 type:java.awt.Rectangle [val]
-       TYPE_OP type=java.awt.Rectangle origin=IMPLICIT_NOTNULL typeOperand=java.awt.Rectangle
-         GET_VAR 'val r: @[FlexibleNullability] java.awt.Rectangle? [val] declared in <root>.foo' type=@[FlexibleNullability] java.awt.Rectangle? origin=null
+       GET_VAR 'val r: @[FlexibleNullability] java.awt.Rectangle? [val] declared in <root>.foo' type=@[FlexibleNullability] java.awt.Rectangle? origin=null
      VAR name:height type:kotlin.Int [val]
        GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:height type:kotlin.Int visibility:public' type=kotlin.Int origin=null
          receiver: GET_VAR 'val r2: java.awt.Rectangle [val] declared in <root>.foo' type=java.awt.Rectangle origin=null
2024-03-28 15:23:27 +00:00
Ian Lynagh
96723b1a8f Kotlin 2: Accept some loc changes 2024-03-28 15:11:19 +00:00
Ian Lynagh
24c4c3e068 Kotlin 2: Accept a test change
With:

    open class Root {}
    class Subclass1: Root() {}

    fun typeTests(x: Root, y: Subclass1) {
        val y1: Subclass1 = if (x is Subclass1) { x } else { y }
    }

we now get a slightly different AST, which means we no longer need to
insert a StmtExpr:

     BRANCH
       if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=<root>.Subclass1
         GET_VAR 'x: <root>.Root declared in <root>.typeTests' type=<root>.Root origin=null
-      then: TYPE_OP type=<root>.Subclass1 origin=IMPLICIT_CAST typeOperand=<root>.Subclass1
-        BLOCK type=<root>.Root origin=null
+      then: BLOCK type=<root>.Subclass1 origin=null
+        TYPE_OP type=<root>.Subclass1 origin=IMPLICIT_CAST typeOperand=<root>.Subclass1
           GET_VAR 'x: <root>.Root declared in <root>.typeTests' type=<root>.Root origin=null
2024-03-28 15:07:30 +00:00
Michael B. Gale
73f71d8ace Merge pull request #15979 from github/mbg/go/deal-with-incorrect-versions 2024-03-28 14:16:14 +00:00
Michael B. Gale
f6c22d466f Update toolchain_test.go
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2024-03-28 13:32:02 +00:00
Sid Shankar
aeacfb82c1 Merge pull request #16073 from hmac/ruby-re-add-mad-docs
Ruby: Re-add MaD docs
2024-03-28 09:18:04 -04:00
Paolo Tranquilli
2fa2a5a53c Merge pull request #15984 from github/alexdenisov/swift-5.10
Swift: upgrade to 5.10
2024-03-28 13:58:39 +01:00
Geoffrey White
03d0d984e3 C++: Remove duplicate TDataFlowCallable's and fix three places where we assumed a source callable (two of them would have caused lost results). 2024-03-28 11:39:43 +00:00
Michael B. Gale
977ac71b26 Update toolchain_test.go
Co-authored-by: Owen Mansel-Chan <62447351+owen-mc@users.noreply.github.com>
2024-03-28 11:15:30 +00:00
Ian Lynagh
5dcd635403 Merge pull request #15961 from igfoo/igfoo/MissingEnumInSwitch
Java: Limit the amount of results that MissingEnumInSwitch produces per switch
2024-03-28 11:13:45 +00:00
Paolo Tranquilli
a34bb2608d Swift: fix ql format 2024-03-28 11:57:33 +01:00
Paolo Tranquilli
ece0d1f477 Swift: add upgrade/downgrade scripts 2024-03-28 11:54:18 +01:00
Paolo Tranquilli
bfce01cef6 Swift: add change note for Swift 5.10 upgrade 2024-03-28 11:38:39 +01:00
James Fletcher
d57e8efaf2 Update codeql-for-javascript.rst 2024-03-28 10:28:37 +00:00
Geoffrey White
a55f07ac68 C++: QLDoc FlowSummaryNode. 2024-03-28 10:17:39 +00:00
Jeroen Ketema
3d8ac1441a Merge pull request #16074 from jketema/reuse-val-cat
C++: Add value category column to the expr_reuse relation
2024-03-28 10:14:32 +01:00
dependabot[bot]
07f9614dc2 Bump chrono from 0.4.35 to 0.4.37 in /ql
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.35 to 0.4.37.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.35...v0.4.37)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 03:07:21 +00:00
Jami Cogswell
e90f55a05f Java: move change note to lib 2024-03-27 20:56:19 -04:00
Jami Cogswell
e58e5fb825 Java: add change note 2024-03-27 20:51:13 -04:00
Jami Cogswell
b35f318910 Java: update models 2024-03-27 20:39:34 -04:00
Jeroen Ketema
9eb51a9b9e C++: Add value category column to the expr_reuse relation 2024-03-27 22:49:40 +01:00
Jeroen Ketema
9e47909208 Merge pull request #16065 from geoffw0/codeowners
C++: Divide CODEOWNERS responsibilities.
2024-03-27 22:22:15 +01:00
Harry Maclean
3690f294da Ruby: add MaD doc to TOC tree 2024-03-27 21:02:25 +00:00
Ian Lynagh
b6a1266ade Java: Accept test changes for MissingEnumInSwitch Oxford commas 2024-03-27 18:48:22 +00:00
Harry Maclean
ce0edcc265 Ruby: Make MaD doc visible to search
Co-authored-by: James Fletcher <42464962+jf205@users.noreply.github.com>
2024-03-27 17:29:18 +00:00
James Fletcher
04edd6ec69 Update docs/codeql/codeql-language-guides/codeql-for-javascript.rst 2024-03-27 17:08:47 +00:00
James Fletcher
121fed63a0 Update codeql-for-javascript.rst 2024-03-27 17:06:31 +00:00
James Fletcher
fbc0f57280 Update customizing-library-models-for-javascript.rst 2024-03-27 16:58:11 +00:00
Paolo Tranquilli
e9957aa4a6 Swift: make result a child in ThenStmt 2024-03-27 17:53:36 +01:00
Geoffrey White
103932fec8 C++: Resolve discussed TODO comment. 2024-03-27 16:44:50 +00:00
Geoffrey White
507ada1951 C++: Sort out the localFlow / simpleLocalFlow confusion (and the same for taint). 2024-03-27 16:05:35 +00:00
Harry Maclean
f6e2e1319b Ruby: Link to MaD docs from Ruby doc page
Also remove an internal link from the docs.
2024-03-27 15:30:05 +00:00
Harry Maclean
e6ba0a34f4 Revert "Ruby: remove customizing-library-models-for-ruby.rst"
This reverts commit 5b46256fdb.
2024-03-27 15:24:30 +00:00
Michael B. Gale
45b41bb506 Go: Mirror stdout/stderr output in InstallVersion 2024-03-27 15:18:24 +00:00
Michael B. Gale
6b1d1d427c Go: Add integration test for incorrect version format logic 2024-03-27 15:16:32 +00:00
Michael B. Gale
6ea99825be Go: Add unit test to sanity check HasGoVersion 2024-03-27 15:15:40 +00:00
Michael B. Gale
ab255d70b5 Go: Fix semver-related logic bugs 2024-03-27 15:15:20 +00:00
Ian Lynagh
fda3c92612 Java: Add a changenote for the MissingEnumInSwitch change 2024-03-27 15:12:55 +00:00
Ian Lynagh
59ae6dd5f5 Java: Add a couple of Oxford commas 2024-03-27 15:07:58 +00:00
Michael B. Gale
86bf4fbbc0 Go: Make diagnostic names static 2024-03-27 14:22:58 +00:00
Jami Cogswell
40c932a5f9 Java: move UrlForward.qll code to UrlForwardQuery.qll 2024-03-27 10:12:28 -04:00
Max Schaefer
5b07e14fb3 Merge pull request #16055 from github/max-schaefer/go-open-redirect-qhelp
Go: Improve QHelp for `go/unvalidated-url-redirection`.
2024-03-27 13:56:48 +00:00
Paolo Tranquilli
0243d9f2b9 Swift: accept explicit any in existential type name 2024-03-27 13:49:15 +01:00
Jami Cogswell
2391fe7d89 Java: use InlineFlowTest instead of InlineExpectationsTest 2024-03-27 08:44:17 -04:00
Paolo Tranquilli
d9c40488bb Swift: add ThenStmt to control flow 2024-03-27 13:37:24 +01:00
Paolo Tranquilli
b8e38288e3 Swift: add extraction of ThenStmt
These are currently added implicitly by the compiler in the context of
`if`/`switch` expressions. In the future, there might be explicit
`then <expr>` statement useful for cases where one would like to add
more than one statement in the branch, to mark what value to actually
use.

See https://forums.swift.org/t/pitch-multi-statement-if-switch-do-expressions/68443
2024-03-27 13:26:04 +01:00
Max Schaefer
32ebd4eebb Automodel: Filter unexploitable types in application mode.
We already did this in framework mode.
2024-03-27 12:22:24 +00:00
Arthur Baars
ba89f1b6b1 Merge pull request #15896 from github/aibaars/java-update-output
Java: update expected output
2024-03-27 13:19:52 +01:00
Jami Cogswell
121b24ea7c Java: remove parentheses 2024-03-27 08:16:06 -04:00