Debian Codegraph @

cross-project-tests/debuginfo-tests/dexter-tests/deferred_globals.cpp

raw
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 // RUN: %clang++ -std=gnu++11 -O0 -g %s -o %t
8 // RUN: %dexter --fail-lt 1.0 -w \
9 // RUN: --binary %t %dexter_lldb_args -v -- %s
10
11 const int d = 100;
12
13 extern int foo();
14
15 int main() {
16 const int d = 4;
17 const float e = 4; // DexLabel("main")
18 const char *f = "Woopy";
19 return d + foo();
20 }
21
22 int foo() {
23 return d; // DexLabel("foo")
24 }
25
26 // DexExpectWatchValue('d', '4', on_line=ref('main'))
27 // DexExpectWatchValue('d', '100', on_line=ref('foo'))
28