aggregate-indirect-arg.cpp
654 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// REQUIRES: lldb
// UNSUPPORTED: system-windows
//
// RUN: %dexter --fail-lt 1.0 -w \
// RUN: --builder 'clang' --debugger 'lldb' --cflags "-O0 -g" \
// RUN: --ldflags="-lstdc++" -- %s
// Radar 8945514
class SVal {
public:
~SVal() {}
const void* Data;
unsigned Kind;
};
void bar(SVal &v) {}
class A {
public:
void foo(SVal v) { bar(v); } // DexLabel('foo')
};
int main() {
SVal v;
v.Data = 0;
v.Kind = 2142;
A a;
a.foo(v);
return 0;
}
/*
DexExpectProgramState({
'frames': [
{
'location': { 'lineno': 'foo' },
'watches': {
'v.Data == 0': 'true',
'v.Kind': '2142'
}
}
]
})
*/