*new* check_macros: find macro precedence bugs
[smatch.git] / validation / sm_compound_conditions3.c
blob5efa45877b99d9dc6e55964e78fe6ada8afbcd7d
1 #include "check_debug.h"
3 int aaa;
5 void func (void)
7 if (aaa > 0 && aaa < 100) {
8 __smatch_value("aaa");
9 } else {
10 __smatch_value("aaa");
12 if (aaa > 0 && aaa < 100 && aaa < 10) {
13 __smatch_value("aaa");
14 } else {
15 if (aaa != 42)
16 __smatch_value("aaa");
20 * check-name: Compound Conditions #3
21 * check-command: smatch -I.. sm_compound_conditions3.c
23 * check-output-start
24 sm_compound_conditions3.c +8 func(3) aaa = 1-99
25 sm_compound_conditions3.c +10 func(5) aaa = min-0,100-max
26 sm_compound_conditions3.c +13 func(8) aaa = 1-9
27 sm_compound_conditions3.c +16 func(11) aaa = min-0,10-41,43-max
28 * check-output-end