1 // This ensures that DW_OP_deref is inserted when necessary, such as when NRVO
2 // of a string object occurs in C++.
4 // REQUIRES: system-windows
6 // RUN: %clang_cl /Z7 /Zi %s -o %t
7 // RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
11 string(int i
) : i(i
) {}
18 return result
; // DexLabel('readresult1')
20 void some_function(int) {}
23 string2(string2
&&other
) { i
= other
.i
; }
26 string2
get_string2() {
29 some_function(result
.i
);
30 // Test that the debugger can get the value of result after another
31 // function is called.
32 return result
; // DexLabel('readresult2')
39 // DexExpectWatchValue('result.i', 3, on_line=ref('readresult1'))
40 // DexExpectWatchValue('result.i', 5, on_line=ref('readresult2'))