Commit Graph

2520 Commits

Author SHA1 Message Date
cokeBeer
aa2d4450ad add v1modulePath() 2022-05-13 21:24:58 +08:00
cokeBeer
75f2edd220 add v2modulePath() 2022-05-13 21:22:23 +08:00
cokeBeer
808dde2fc1 add v2modulePath() 2022-05-13 21:21:16 +08:00
cokeBeer
252b19063e Merge branch 'github:main' into main 2022-05-13 20:23:24 +08:00
Chris Smowton
211580e608 Merge pull request #738 from hvitved/xml-dbscheme-files-folders
Drop redundant columns from `files` and `folders` relations in `xml.dbscheme`
2022-05-13 10:35:45 +01:00
Tom Hvitved
e68a727f9a Drop redundant columns from files and folders relations in xml.dbscheme 2022-05-12 20:21:48 +02:00
cokeBeer
ebcb040050 update fix 2022-05-12 09:53:49 +08:00
cokeBeer
c70358033d update fix 2022-05-12 09:31:35 +08:00
Chris Smowton
d9e7d34e03 Merge pull request #735 from github/smowton/admin/generics-change-note
Add change note announcing generics support
2022-05-11 12:06:09 +01:00
Chris Smowton
72022e65d5 Copyedit 2022-05-11 10:46:16 +01:00
Chris Smowton
7530943e07 Add change note announcing generics support 2022-05-11 10:42:58 +01:00
Chris Smowton
440b3118cb Merge pull request #686 from owen-mc/extract-generics
Extract generics
2022-05-11 10:14:58 +01:00
cokeBeer
2b51b4206e fix https://github.com/github/codeql/issues/9097 2022-05-11 11:22:23 +08:00
Chris Smowton
c0fbd03133 Add qldoc for getTermInIntersection 2022-05-10 14:52:10 +01:00
Chris Smowton
3129c3dd69 Remove commented-out debug code 2022-05-10 14:52:10 +01:00
Chris Smowton
d330033908 Make objects-map-changed warning non-fatal 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
3c4b5202e3 Fix type aliases for instantiated generic types 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
d098bdc7f8 Reintroduce noinlined predicate to fix performance 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ac081dc47a Make TypeParamParent map global 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8477053c90 Test calling generic functions from other files 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
7f1f428b41 Remove invalid code in test
"type declarations inside generic functions are not currently supported"
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
aa62fabe26 Fix another place where type could be nil 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
06d139848d Fix panic when type is unknown 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
2e8b9a9a7d Fix extractor crash when missing type information 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ba147e8661 Test calls through variables
The tests which involve a flow through a receiver with a non-trivial access path
currently don't give the right result. This should be
fixed in a follow-up issue.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4a9aeacb69 Find callee through function instantiation 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
3790c4eb4d Control flow for generic function instantiations 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
0dee215e8c Update CodeQL tests to go 1.18.1 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
a8a351f6ae Improve comment 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
20562cb43d Add missing this. to member predicate calls 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
5257c4ab45 Add control flow test 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
26d4acd3b6 generic function instantions aren't type exprs 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
ce9c9cfe9d CallExpr.getCalleeExpr should get uninstantiated function 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
7a7ca619b3 Add data flow tests for generic structs, methods and functions 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4e71ab5cfc Update comment above first extraction of packages 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
25b91d8155 Update tests 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8c15199ca9 Use generic struct field not instantiated one in Uses
We do not extract instantiated named types, and instead use the generic
type. But fields of the underlying struct of an instantiated named types
are obtained from the Uses map. We solve this keeping track of which
objects should be overridden by which other objects.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
8276ca04b4 Use generic method not instantiated one in Uses 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
253ca2bb67 Address review comments 2 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
59aa7426ec Add comments about entities without a parent scope 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
9abc7ea617 Address review comments 1 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4828430fd4 Extract all object types before emitting them
Note that `extractObjectType` calls `extractType` which may add
additional objects to the list that `ForEachObject` loops over, so
we should emit object types as a second pass.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4fa972fdc5 Rename variable for clarity 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
1da5399652 Fix obvious test failures 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
0194eb98d7 Add an upgrade and downgrade script 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
4d9937d1c6 Add tests 2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
63d1663eb2 bug fix: label pointer-typed receivers correctly
We were trying to convert the object's type to a named type
to iterate through its methods, forgetting that it could also be
a pointer to a named type.

This bug was exposed because we no longer extract an object's
type before extracting it (unless it is a receiver), and when we
extracted a named type we extract its methods and when
extracting a method we extract its receiver and we always give
it the correct label in that situation.
2022-05-10 14:52:10 +01:00
Owen Mansel-Chan
92c331402d Extract type parameters in types, not just decls 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
213fa1fec2 Break out of loop when a match has been found 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
982f11f8c7 Make ScopedObjectID take a function
This is so that ExtractType() won't be called except in the case
of a receiver variable, which is important for extracting type
parameters.
2022-05-10 14:52:09 +01:00