brintos

brintos / llvm-project-archived public Read only

0
0
Text · 853 B · 7274506 Raw
31 lines · cpp
1// REQUIRES: system-windows2//3// RUN: %clang_cl /Z7 /Zi %s -o %t4// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s5 6// Check that global constants have debug info.7 8const float TestPi = 3.14;9struct S {10  static const char TestCharA = 'a';11};12enum TestEnum : int {13  ENUM_POS = 2147000000,14  ENUM_NEG = -2147000000,15};16void useConst(int) {}17int main() {18  useConst(TestPi);19  useConst(S::TestCharA);20  useConst(ENUM_NEG); // DexLabel('stop')21  return 0;22}23 24// DexExpectWatchValue('TestPi', 3.140000104904175, on_line=ref('stop'))25// DexExpectWatchValue('S::TestCharA', 97, on_line=ref('stop'))26// DexExpectWatchValue('ENUM_NEG', -2147000000, on_line=ref('stop'))27/* DexExpectProgramState({'frames': [{28               'location': {'lineno' : ref('stop')},29               'watches': {'ENUM_POS' : {'is_irretrievable': True}}30}]}) */31