From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/FixIt/no-macro-fixit.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 clang/test/FixIt/no-macro-fixit.c (limited to 'clang/test/FixIt/no-macro-fixit.c') diff --git a/clang/test/FixIt/no-macro-fixit.c b/clang/test/FixIt/no-macro-fixit.c new file mode 100644 index 0000000..b6a9285 --- /dev/null +++ b/clang/test/FixIt/no-macro-fixit.c @@ -0,0 +1,16 @@ +// 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}} + } +} -- cgit v1.2.3