Merge pull request #16457 from owen-mc/go/fix-implicitvarargsslice-type

Go: Fix `getType` on `ImplicitVarArgsSlice`
This commit is contained in:
Owen Mansel-Chan
2024-05-08 20:52:01 +01:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Fixed a bug that stopped data flow from being followed through variadic arguments to built-in functions or to functions called using a variable.

View File

@@ -455,8 +455,8 @@ module Public {
CallNode getCallNode() { result = call }
override Type getType() {
exists(Function f | f = call.getTarget() |
result = f.getParameterType(f.getNumParameter() - 1)
exists(SignatureType t | t = call.getCall().getCalleeType() |
result = t.getParameterType(t.getNumParameter() - 1)
)
}