mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
19 lines
244 B
Swift
19 lines
244 B
Swift
|
|
func test(c: Bool, x: Int, y: Int, z: Int) {
|
|
var v = 0
|
|
|
|
// arithmetic operations
|
|
v = x + y;
|
|
v = x - 1;
|
|
v = 2 * y;
|
|
v = 3 / 4;
|
|
v = x % y;
|
|
v = -x;
|
|
v = +x;
|
|
|
|
// arithmetic operations with overflow
|
|
v = x &+ y;
|
|
v = x &- y;
|
|
v = x &* y;
|
|
}
|