Several improvements from Doug Gregor related to default
argument handling.  I'll fix up the c89 (void) thing next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/arg-invalid.c b/test/Sema/arg-invalid.c
deleted file mode 100644
index 03ce00a..0000000
--- a/test/Sema/arg-invalid.c
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: clang %s -fsyntax-only -verify
-
-void bar (void *); 
-void f11 (z)       // expected-error {{may not have 'void' type}}
-void z; 
-{ bar (&z); }
diff --git a/test/Sema/c89.c b/test/Sema/c89.c
index 6a12f1c..9202515 100644
--- a/test/Sema/c89.c
+++ b/test/Sema/c89.c
@@ -47,3 +47,13 @@
 int a(sometype, y) {return 0;}  /* expected-warning {{declaration specifier missing, defaulting to 'int'}} */
 
 
+
+
+void bar (void *); 
+void f11 (z)       /* expected-error {{may not have 'void' type}} */
+void z; 
+{ bar (&z); }
+
+typedef void T;
+void foo(T); /* expected-warning {{empty parameter list defined with a typedef of 'void' is a C99 feature}} */
+
diff --git a/test/Sema/default2.cpp b/test/Sema/default2.cpp
index 0fe04ab..d72f550 100644
--- a/test/Sema/default2.cpp
+++ b/test/Sema/default2.cpp
@@ -10,3 +10,18 @@
   f(0, 1);
   f(0, 1, 2);
 }
+
+
+int f1(int i, int i, int j) { // expected-error {{redefinition of parameter 'i'}}
+  i = 17;
+  return j;
+} 
+
+int x;
+void g(int x, int y = x); // expected-error {{default argument references parameter 'x'}}
+
+void h()
+{
+   int i;
+   extern void h2(int x = sizeof(i)); // expected-error {{default argument references local variable 'i' of enclosing function}}
+}