Add support for "if (a?b:c) { ..." ternary conditions
commit2b644c93808a428d9def9c960a95686307e8629b
authorDan Carpenter <error27@gmail.com>
Fri, 20 Feb 2009 22:36:49 +0000 (21 01:36 +0300)
committerDan Carpenter <error27@gmail.com>
Fri, 20 Feb 2009 22:36:49 +0000 (21 01:36 +0300)
treeaad7bfeec3500ac900dd4a891cc21fffe637480c
parenta392144e6fbf186fce1deb9553e53f724f12d85e
Add support for "if (a?b:c) { ..." ternary conditions

One place where this is used is in __cond_lock.
#define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)

I also added support so that known_condition_true() returns true for
"({ __acquire(x); 1; })".

Signed-off-by: Dan Carpenter <error27@gmail.com>
smatch.h
smatch_conditions.c
smatch_extra.c
smatch_helper.c
smatch_states.c
validation/sm_select.c [new file with mode: 0644]