summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c
blob: 71f4cb234e329c2d9e3ca0dbd6d46b3c8a4a2cba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//===-- main.c --------------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

int foo(int x, int y) {
    int z = 3 + x;
    return z + y; //% self.expect("frame variable -s", substrs=['ARG: (int) x = -3','ARG: (int) y = 0'])
     //% self.expect("frame variable -s x", substrs=['ARG: (int) x = -3'])
     //% self.expect("frame variable -s y", substrs=['ARG: (int) y = 0'])
     //% self.expect("frame variable -s z", substrs=['LOCAL: (int) z = 0'])
}

int main (int argc, char const *argv[])
{
    return foo(-3,0);  //% self.expect("frame variable -s argc argv", substrs=['ARG: (int) argc ='])
}