aboutsummaryrefslogtreecommitdiff
path: root/clang/test/FixIt/no-macro-fixit.c
blob: a814dc7a93502f6c402e1530196ba878107e42ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -pedantic -fixit -x c %s

#define va_arg(ap, type)    __builtin_va_arg(ap, type)
typedef __builtin_va_list va_list;

void myFunc(void) {
    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}}
    }
}