smatch: relicense to GPLv2+
[smatch.git] / validation / sm_implied12.c
blobe35ea59661f365994894f5a9b1f6e3dcd681c395
1 #include "check_debug.h"
3 struct foo {
4 int x;
5 };
7 void *frob();
9 struct foo *foo;
11 int x;
13 static void ad_agg_selection_logic(void)
15 int a;
18 if (x) {
19 if (foo && foo->x)
20 a = 1;
21 else
22 a = 0;
24 if (frob())
25 a = frob();
27 if (a)
28 __smatch_implied(foo);
32 * check-name: smatch implied #12
33 * check-command: smatch -I.. -m64 sm_implied12.c
35 * check-output-start
36 sm_implied12.c:28 ad_agg_selection_logic() implied: foo = '0,4096-s64max'
37 * check-output-end