brintos

brintos / llvm-project-archived public Read only

0
0
Text · 563 B · a814dc7 Raw
16 lines · c
1// RUN: %clang_cc1 -pedantic -fixit -x c %s2 3#define va_arg(ap, type)    __builtin_va_arg(ap, type)4typedef __builtin_va_list va_list;5 6void myFunc(void) {7    va_list values;8    9    int value;10 11    while (value = va_arg(values, int)) {  // expected-warning {{using the result of an assignment as a condition without parentheses}} \12                                           // expected-note {{use '==' to turn this assignment into an equality comparison}} \13					   // expected-note {{place parentheses around the assignment to silence this warning}}14    }15}16