29 lines · cpp
1// Purpose:2// Ensure that debug information for a local variable does not hide3// a global definition that has the same name.4 5// REQUIRES: lldb6// UNSUPPORTED: system-windows7// RUN: %clang++ -std=gnu++11 -O0 -g %s -o %t8// RUN: %dexter --fail-lt 1.0 -w \9// RUN: --binary %t %dexter_lldb_args -v -- %s10 11const int d = 100;12 13extern int foo();14 15int main() {16 const int d = 4;17 const float e = 4; // DexLabel("main")18 const char *f = "Woopy";19 return d + foo();20}21 22int 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 29