1 | // Purpose: |
2 | // Test that a \DexDeclareAddress value can be used to compare the |
3 | // addresses of two local variables that refer to the same address. |
4 | // |
5 | // RUN: %dexter_regression_test_build %s -o %t |
6 | // RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s |
7 | // CHECK: expression_address.cpp |
8 | |
9 | int main() { |
10 | int x = 5; |
11 | int &y = x; |
12 | x = 3; // DexLabel('test_line') |
13 | } |
14 | |
15 | // DexDeclareAddress('x_addr', '&x', on_line=ref('test_line')) |
16 | // DexExpectWatchValue('&x', address('x_addr'), on_line=ref('test_line')) |
17 | // DexExpectWatchValue('&y', address('x_addr'), on_line=ref('test_line')) |
18 | |