Add a warning for questionable va_args usage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68435 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/varargs-x86-64.c b/test/Sema/varargs-x86-64.c
new file mode 100644
index 0000000..7953ead
--- /dev/null
+++ b/test/Sema/varargs-x86-64.c
@@ -0,0 +1,8 @@
+// RUN: clang-cc -fsyntax-only -verify %s -triple x86_64-apple-darwin9
+
+// rdar://6726818
+void f1() {
+  const __builtin_va_list args2;
+  (void)__builtin_va_arg(args2, int); // expected-warning {{va_arg applied to va_list type 'struct __va_list_tag const *' with unexpected qualifiers}}
+}
+