1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -pedantic -fixit -x c %s 2*f4a2713aSLionel Sambuc // rdar://9091893 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc #define va_arg(ap, type) __builtin_va_arg(ap, type) 5*f4a2713aSLionel Sambuc typedef __builtin_va_list va_list; 6*f4a2713aSLionel Sambuc myFunc()7*f4a2713aSLionel Sambucvoid myFunc() { 8*f4a2713aSLionel Sambuc va_list values; 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc int value; 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc while (value = va_arg(values, int)) { // expected-warning {{using the result of an assignment as a condition without parentheses}} \ 13*f4a2713aSLionel Sambuc // expected-note {{use '==' to turn this assignment into an equality comparison}} \ 14*f4a2713aSLionel Sambuc // expected-note {{place parentheses around the assignment to silence this warning}} 15*f4a2713aSLionel Sambuc } 16*f4a2713aSLionel Sambuc } 17