• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Purpose:
2 // Ensure that debug information for a local variable does not hide
3 // a global definition that has the same name.
4 
5 // REQUIRES: lldb
6 // UNSUPPORTED: system-windows
7 
8 // RUN: %dexter --fail-lt 1.0 -w \
9 // RUN:     --builder 'clang' --debugger 'lldb' \
10 // RUN:     --cflags "-g -O0" -v -- %s
11 
12 const int d = 100;
13 
14 extern int foo();
15 
main()16 int main() {
17   const int d = 4;
18   const float e = 4; // DexLabel("main")
19   const char *f = "Woopy";
20   return d + foo();
21 }
22 
foo()23 int foo() {
24   return d; // DexLabel("foo")
25 }
26 
27 // DexExpectWatchValue('d', '4', on_line='main')
28 // DexExpectWatchValue('d', '100', on_line='foo')
29 
30