Add CASE_HOOK.
[smatch.git] / validation / smatch_closet / sm_known.c
blob1b2f983e48be6b65250ff287a1f643f1e12293cc
1 void _spin_lock(int name);
2 void _spin_unlock(int name);
4 void frob(void){}
5 int a;
6 int b;
7 int c;
8 int func (void)
10 int mylock = 1;
11 int mylock2 = 2;
13 if (1)
14 _spin_unlock(mylock);
15 frob();
16 if (1)
17 _spin_lock(mylock);
18 if (0)
19 _spin_unlock(mylock);
20 frob();
21 if (0)
22 _spin_lock(mylock);
23 return 0;
27 * smatch currently has --known-conditions off by default so it
28 * trips up over this check. Smatch extra needs to be improved, smatch needs
29 * to do a 2 pass check, and then known conditions can be enabled by default.