Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / warn-binary-conditional-expression-unused.c
blob3e3e978fabfc32fd78f35082f8919812063302fe
1 // RUN: %clang_cc1 -fsyntax-only -Wunused-value -verify %s
2 int main(void) {
3 int a;
4 int b;
5 a ? : b; //expected-warning{{expression result unused}}
6 a ? a : b; //expected-warning{{expression result unused}}
7 a ? : ++b;
8 a ? a : ++b;
9 ++a ? : b; //expected-warning{{expression result unused}}
10 ++a ? a : b; //expected-warning{{expression result unused}}
11 ++a ? : ++b;
12 ++a ? a : ++b;
13 return 0;