1// Purpose:
2// Test that a \DexDeclareAddress value can have its value defined after
3// the first reference to that value.
4//
5// RUN: %dexter_regression_test_build %s -o %t
6// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
7// CHECK: address_after_ref.cpp
8
9int main() {
10 int *x = new int(5);
11 int *y = x; // DexLabel('first_line')
12 delete x; // DexLabel('last_line')
13}
14
15// DexDeclareAddress('y', 'y', on_line=ref('last_line'))
16// DexExpectWatchValue('x', address('y'), on_line=ref('first_line'))
17

source code of cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_after_ref.cpp