repo.or.cz
/
smatch.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct_assignment: handle memcpy(foo, ...) where foo is not a struct
[smatch.git]
/
validation
/
sm_fake_assignment.c
blob
28f7fdb446b8985184df41a705022466cc63dea4
1
#include
"check_debug.h"
2
3
struct
ture
{
4
int
x
,
y
;
5
};
6
7
struct
ture outside
= {
8
.
x
=
1
,
9
.
y
=
2
,
10
};
11
12
struct
ture buf
[
10
];
13
void
test
(
void
)
14
{
15
int
a
,
b
;
16
17
a
=
0
;
18
b
=
0
;
19
buf
[
a
++] =
outside
;
20
buf
[++
b
] =
outside
;
21
__smatch_implied
(
a
);
22
__smatch_implied
(
b
);
23
}
24
25
/*
26
* check-name: smatch fake assignment
27
* check-command: smatch -I.. sm_fake_assignment.c
28
*
29
* check-output-start
30
sm_fake_assignment.c:21 test() implied: a = '1'
31
sm_fake_assignment.c:22 test() implied: b = '1'
32
* check-output-end
33
*/