You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
428 B

// RUN: %clang_cc1 -fsyntax-only -Wunused-value -verify %s
int main() {
int a;
int b;
a ? : b; //expected-warning{{expression result unused}}
a ? a : b; //expected-warning{{expression result unused}}
a ? : ++b;
a ? a : ++b;
++a ? : b; //expected-warning{{expression result unused}}
++a ? a : b; //expected-warning{{expression result unused}}
++a ? : ++b;
++a ? a : ++b;
return 0;
};