minix/external/bsd/llvm/dist/clang/test/FixIt/no-macro-fixit.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

16 lines
577 B
C

// RUN: %clang_cc1 -pedantic -fixit -x c %s
// rdar://9091893
#define va_arg(ap, type) __builtin_va_arg(ap, type)
typedef __builtin_va_list va_list;
void myFunc() {
va_list values;
int value;
while (value = va_arg(values, int)) { // expected-warning {{using the result of an assignment as a condition without parentheses}} \
// expected-note {{use '==' to turn this assignment into an equality comparison}} \
// expected-note {{place parentheses around the assignment to silence this warning}}
}
}