brintos

brintos / llvm-project-archived public Read only

0
0
Text · 758 B · c5803dd Raw
23 lines · cpp
1// Purpose:2//      Test that when a \DexDeclareAddress never resolves to a value, it is3//      counted as a missing value in any \DexExpectWatchValues.4//5// The dbgeng driver doesn't support \DexDeclareAddress yet.6// UNSUPPORTED: system-windows7//8// RUN: %dexter_regression_test_cxx_build %s -o %t9// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s10// CHECK: missing_dex_address.cpp11 12int main() {13    int *x = nullptr;14    x = new int(5); // DexLabel('start_line')15    if (false) {16        (void)0; // DexLabel('unreachable')17    }18    delete x; // DexLabel('end_line')19}20 21// DexDeclareAddress('x', 'x', on_line=ref('unreachable'))22// DexExpectWatchValue('x', 0, address('x'), from_line=ref('start_line'), to_line=ref('end_line'))23