expressions: make assign_expression() take an op argument
[smatch.git] / validation / kill-pure-call.c
blobd3f78c026d7513e4828ec4f46660dcfa6d9a040a
1 int side(int a);
2 int pure(int a) __attribute__((pure));
4 int keep(int a) { return side(a) && 0; }
5 int kill(int a) { return pure(a) && 0; }
7 /*
8 * check-name: kill-pure-call
9 * check-command: test-linearize -Wno-decl $file
10 * check-description:
11 * See that the call is optimized away but only
12 * when the function is "pure".
14 * check-output-ignore
15 * check-output-contains: call\\..* side
16 * check-output-excludes: call\\..* pure