aboutsummaryrefslogtreecommitdiff
path: root/test/FixIt/no-macro-fixit.c
blob: 3685ab10877de952a782ef3ee2b294d13c5bf6a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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}}
    }
}