mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
We changed the test query when the query was changed so that the comments in the test file would stay the same. I've reverted the test query and updated the comments in the test file. This avoids problems in the branch switching to use-use flow.
27 lines
415 B
Go
27 lines
415 B
Go
// Note that the filename acts as an implicit build constraint
|
|
|
|
package main
|
|
|
|
import (
|
|
"strconv"
|
|
)
|
|
|
|
func testIntSinkAmd64() {
|
|
{
|
|
parsed, err := strconv.ParseInt("3456", 10, 64)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
_ = int(parsed)
|
|
_ = uint(parsed)
|
|
}
|
|
{
|
|
parsed, err := strconv.ParseUint("3456", 10, 64)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
_ = int(parsed) // $ hasValueFlow="parsed"
|
|
_ = uint(parsed)
|
|
}
|
|
}
|