mirror of
https://github.com/github/codeql.git
synced 2026-01-30 23:02:56 +01:00
44 lines
540 B
Go
44 lines
540 B
Go
package main
|
|
|
|
func ok1(x int) int {
|
|
return x + x>>1;
|
|
}
|
|
|
|
func ok2(x int) int {
|
|
return x + x >> 1;
|
|
}
|
|
|
|
func bad(x int) int {
|
|
return x+x >> 1;
|
|
}
|
|
|
|
func ok3(x int) int {
|
|
return x + (x>>1);
|
|
}
|
|
|
|
func ok4(x int, y int, z int) int {
|
|
return x + y + z;
|
|
}
|
|
|
|
func ok5(x int, y int, z int) int {
|
|
return x + y+z;
|
|
}
|
|
|
|
func ok6(x int) int {
|
|
return x + x>> 1;
|
|
}
|
|
|
|
func ok7(x int, y int, z int) int {
|
|
return x + y - z;
|
|
}
|
|
|
|
func ok8(x int, y int, z int) int {
|
|
return x + y-z;
|
|
}
|
|
|
|
func ok9(x int, y int, z int) int {
|
|
return x * y*z;
|
|
}
|
|
|
|
func main() {}
|