Commit Graph

2481 Commits

Author SHA1 Message Date
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
Owen Mansel-Chan
f908a6f1dc Rename parm to param for clarity 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
1e08201632 Extract type param declarations 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
3510f2cdcd Support non-basic interfaces in extractor 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
a05a525755 Extract generic type instantiations to new table 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
e84db95f9c Extract generic function instantiations to new table 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
b8ab46d969 Add QL class for type parameter types 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
3952b1c07a Extract type parameter types (and update dbscheme) 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
f7dcb11816 Extract uninstantiated generic types only 2022-05-10 14:52:09 +01:00
Owen Mansel-Chan
7f0a37913f Use Go 1.18 2022-05-10 14:52:09 +01:00
Mathias Vorreiter Pedersen
ef7363c48e Merge pull request #732 from github/post-release-prep/codeql-cli-2.9.1
Post-release preparation for codeql-cli-2.9.1
2022-05-06 13:15:10 +01:00
github-actions[bot]
fea657ce01 Post-release preparation for codeql-cli-2.9.1 2022-05-05 19:05:56 +00:00
Owen Mansel-Chan
ee94eb5962 Merge pull request #727 from cklin/fix-ql-comments-syntax
Fix Beego references
2022-04-29 09:19:24 +01:00
Chuan-kai Lin
d2fccbea95 Fix Beego references 2022-04-28 12:52:21 -07:00
Mathias Vorreiter Pedersen
ff677cd756 Merge pull request #726 from github/release-prep/2.9.1
Release preparation for version 2.9.1
2022-04-28 14:45:19 +01:00
github-actions[bot]
bcd2c009e3 Release preparation for version 2.9.1 2022-04-28 11:58:54 +00:00
Mathias Vorreiter Pedersen
b8165d47b7 Merge pull request #724 from github/post-release-prep/codeql-cli-2.9.0
Post-release preparation for codeql-cli-2.9.0
2022-04-25 22:53:17 +01:00
github-actions[bot]
59cc2898c9 Post-release preparation for codeql-cli-2.9.0 2022-04-21 19:22:17 +00:00
Mathias Vorreiter Pedersen
d2d92fad36 Merge pull request #723 from github/release-prep/2.9.0
Release preparation for version 2.9.0
2022-04-21 17:14:45 +01:00
Owen Mansel-Chan
6f91cc1cb1 Merge pull request #719 from owen-mc/bugfix/find-callee-through-function-variables
Look for callees through function variables
2022-04-21 17:00:59 +01:00
github-actions[bot]
355f4c6186 Release preparation for version 2.9.0 2022-04-21 14:48:55 +00:00
Owen Mansel-Chan
5f3b913d7f Add change note 2022-04-21 11:34:51 +01:00
Owen Mansel-Chan
62489e1afd Fix viableCallable for function variables 2022-04-21 11:32:08 +01:00
Owen Mansel-Chan
69c9099a24 Look for callees through function variables 2022-04-21 11:32:07 +01:00
Owen Mansel-Chan
373017ab9d Add tests for callees through function variables 2022-04-21 11:32:07 +01:00
Owen Mansel-Chan
528a735a0d Improve CallNode.getCalleeName
Note that any results from expr.getTarget().getName() are also results
from expr.getCalleeName(), so it was redundant to have a disjunction of
both of them.
2022-04-21 11:30:28 +01:00
Owen Mansel-Chan
b6702b644d Improve documentation of CallExpr.getCalleeName 2022-04-21 11:30:27 +01:00
Chris Smowton
a8eeef6ef8 Merge pull request #718 from owen-mc/fix-incorrect-integer-conversion-for-type-assertions
Integer conversion should ignore type assertions
2022-04-12 12:44:43 +01:00
Owen Mansel-Chan
f9f21e9891 Integer conversion should ignore type assertions 2022-04-12 10:58:07 +01:00
Edoardo Pirovano
b953fe39c2 Merge pull request #716 from github/edoardo/3.5-mergeback
Merge `rc/3.5` branch into `main`
2022-04-08 20:43:15 +01:00
Dave Bartolomeo
e3b7ba6b1f Revert "Bump version of suite-helpers dependency"
This reverts commit 49e568ed44.
2022-04-08 14:06:59 -04:00
Dave Bartolomeo
49e568ed44 Bump version of suite-helpers dependency 2022-04-08 13:11:33 -04:00
Owen Mansel-Chan
f196538953 Merge pull request #714 from owen-mc/fix-get-enclosing-callable
Extend DataFlowCallable to include file scopes
2022-04-08 17:02:35 +01:00
Edoardo Pirovano
16c0f11c00 Bump minor version of packs 2022-04-08 15:51:34 +01:00
Owen Mansel-Chan
b9ff1ccd45 Add change note 2022-04-08 15:23:24 +01:00
Ian Lynagh
6f6e8bfbd1 Merge pull request #713 from github/post-release-prep/codeql-cli-2.8.5
Post-release preparation for codeql-cli-2.8.5
2022-04-08 15:09:08 +01:00
Owen Mansel-Chan
76a0a51f39 Merge pull request #715 from owen-mc/print-empty-interface-with-single-space
Pretty-print empty interface without double space
2022-04-08 11:46:04 +01:00
Owen Mansel-Chan
880afea959 Pretty-print empty interface without double space 2022-04-08 06:09:56 +01:00
Owen Mansel-Chan
603c1d518e Extend DataFlowCallable to include file scopes
The motivation is so that getEnclosingCallable() can cope with
nodes that are not in a callable.
2022-04-05 16:00:53 +01:00
github-actions[bot]
469af4c501 Post-release preparation for codeql-cli-2.8.5 2022-04-01 16:21:57 +00:00