Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7f0a379
Use Go 1.18
owen-mc Jan 27, 2022
f7dcb11
Extract uninstantiated generic types only
owen-mc Feb 21, 2022
3952b1c
Extract type parameter types (and update dbscheme)
owen-mc Jan 27, 2022
b8ab46d
Add QL class for type parameter types
owen-mc Feb 9, 2022
e84db95
Extract generic function instantiations to new table
owen-mc Jan 27, 2022
a05a525
Extract generic type instantiations to new table
owen-mc Feb 15, 2022
3510f2c
Support non-basic interfaces in extractor
owen-mc Mar 29, 2022
1e08201
Extract type param declarations
owen-mc Mar 29, 2022
f908a6f
Rename `parm` to `param` for clarity
owen-mc Mar 17, 2022
982f11f
Make ScopedObjectID take a function
owen-mc Mar 31, 2022
213fa1f
Break out of loop when a match has been found
owen-mc Mar 31, 2022
92c3314
Extract type parameters in types, not just decls
owen-mc Mar 29, 2022
63d1663
bug fix: label pointer-typed receivers correctly
owen-mc Mar 31, 2022
4d9937d
Add tests
owen-mc Feb 15, 2022
0194eb9
Add an upgrade and downgrade script
owen-mc Apr 1, 2022
1da5399
Fix obvious test failures
owen-mc Apr 1, 2022
4fa972f
Rename variable for clarity
owen-mc Apr 4, 2022
4828430
Extract all object types before emitting them
owen-mc Apr 4, 2022
9abc7ea
Address review comments 1
owen-mc Apr 4, 2022
59aa742
Add comments about entities without a parent scope
owen-mc Apr 6, 2022
253ca2b
Address review comments 2
owen-mc Apr 7, 2022
8276ca0
Use generic method not instantiated one in Uses
owen-mc Apr 7, 2022
8c15199
Use generic struct field not instantiated one in Uses
owen-mc Apr 8, 2022
25b91d8
Update tests
owen-mc Apr 8, 2022
4e71ab5
Update comment above first extraction of packages
owen-mc Apr 8, 2022
7a7ca61
Add data flow tests for generic structs, methods and functions
owen-mc Apr 11, 2022
ce9c9cf
`CallExpr.getCalleeExpr` should get uninstantiated function
owen-mc Apr 11, 2022
26d4acd
generic function instantions aren't type exprs
owen-mc Apr 11, 2022
5257c4a
Add control flow test
owen-mc Apr 12, 2022
20562cb
Add missing `this.` to member predicate calls
owen-mc Apr 12, 2022
a8a351f
Improve comment
owen-mc Apr 12, 2022
0dee215
Update CodeQL tests to go 1.18.1
owen-mc Apr 13, 2022
3790c4e
Control flow for generic function instantiations
owen-mc Apr 13, 2022
4a9aeac
Find callee through function instantiation
owen-mc Apr 13, 2022
ba147e8
Test calls through variables
owen-mc Apr 21, 2022
2e8b9a9
Fix extractor crash when missing type information
owen-mc Apr 25, 2022
06d1398
Fix panic when type is unknown
owen-mc Apr 26, 2022
aa62fab
Fix another place where type could be nil
owen-mc Apr 26, 2022
7f1f428
Remove invalid code in test
owen-mc Apr 27, 2022
8477053
Test calling generic functions from other files
owen-mc Apr 27, 2022
ac081dc
Make TypeParamParent map global
owen-mc Apr 27, 2022
d098bdc
Reintroduce noinlined predicate to fix performance
owen-mc Apr 29, 2022
3c4b520
Fix type aliases for instantiated generic types
owen-mc May 3, 2022
d330033
Make objects-map-changed warning non-fatal
smowton May 10, 2022
3129c3d
Remove commented-out debug code
smowton May 10, 2022
c0fbd03
Add qldoc for `getTermInIntersection`
smowton May 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/codeqltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.17
- name: Set up Go 1.18.1
uses: actions/setup-go@v1
with:
go-version: 1.17
go-version: 1.18.1
id: go

- name: Set up CodeQL CLI
Expand Down Expand Up @@ -59,10 +59,10 @@ jobs:
name: Test MacOS
runs-on: macOS-latest
steps:
- name: Set up Go 1.17
- name: Set up Go 1.18.1
uses: actions/setup-go@v1
with:
go-version: 1.17
go-version: 1.18.1
id: go

- name: Set up CodeQL CLI
Expand Down Expand Up @@ -99,10 +99,10 @@ jobs:
name: Test Windows
runs-on: windows-2019
steps:
- name: Set up Go 1.17
- name: Set up Go 1.18.1
uses: actions/setup-go@v1
with:
go-version: 1.17
go-version: 1.18.1
id: go

- name: Set up CodeQL CLI
Expand Down
41 changes: 41 additions & 0 deletions downgrades/90fa7836e0a239f69bbebffcf342e92c240d54bc/exprs.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
class Expr_ extends @expr {
string toString() { result = "Expr" }
}

class ExprParent_ extends @exprparent {
string toString() { result = "ExprParent" }
}

/**
* Two new kinds have been inserted such that `@sliceexpr` which used to have
* index 13 now has index 15. Another new kind has been inserted such that
* `@plusexpr` which used to have index 23 now has index 26. Entries with
* indices lower than 13 are unchanged.
*/
bindingset[new_index]
int old_index(int new_index) {
if new_index < 13
then result = new_index
else
if new_index = [13, 14]
then result = 0 // badexpr
else
if new_index < 23
then result + (15 - 13) = new_index
else
if new_index = 23
then result = 0 // badexpr
else result + (26 - 23) = new_index
}

// The schema for exprs is:
//
// exprs(unique int id: @expr,
// int kind: int ref,
// int parent: @exprparent ref,
// int idx: int ref);
from Expr_ expr, int new_kind, ExprParent_ parent, int idx, int old_kind
where
exprs(expr, new_kind, parent, idx) and
old_kind = old_index(new_kind)
select expr, old_kind, parent, idx
Loading