Pretty up the wrong-number-of-arguments-for-attribute diagnostic by
using a custom plural form.  Split out the range diagnostics as their
own message.

llvm-svn: 126840
diff --git a/clang/test/Sema/annotate.c b/clang/test/Sema/annotate.c
index 4d55075..6f81491 100644
--- a/clang/test/Sema/annotate.c
+++ b/clang/test/Sema/annotate.c
@@ -3,5 +3,5 @@
 void __attribute__((annotate("foo"))) foo(float *a) { 
   __attribute__((annotate("bar"))) int x;
   __attribute__((annotate(1))) int y; // expected-error {{argument to annotate attribute was not a string literal}}
-  __attribute__((annotate("bar", 1))) int z; // expected-error {{attribute requires 1 argument(s)}}
+  __attribute__((annotate("bar", 1))) int z; // expected-error {{attribute takes one argument}}
 }
diff --git a/clang/test/Sema/attr-cleanup.c b/clang/test/Sema/attr-cleanup.c
index 9057c27..59ebbfc 100644
--- a/clang/test/Sema/attr-cleanup.c
+++ b/clang/test/Sema/attr-cleanup.c
@@ -8,8 +8,8 @@
 
 void t1()
 {
-    int v1 __attribute((cleanup)); // expected-error {{attribute requires 1 argument(s)}}
-    int v2 __attribute((cleanup(1, 2))); // expected-error {{attribute requires 1 argument(s)}}
+    int v1 __attribute((cleanup)); // expected-error {{attribute takes one argument}}
+    int v2 __attribute((cleanup(1, 2))); // expected-error {{attribute takes one argument}}
     
     static int v3 __attribute((cleanup(c1))); // expected-warning {{cleanup attribute ignored}}
     
diff --git a/clang/test/Sema/attr-naked.c b/clang/test/Sema/attr-naked.c
index 65d1726..1ebd784 100644
--- a/clang/test/Sema/attr-naked.c
+++ b/clang/test/Sema/attr-naked.c
@@ -4,5 +4,5 @@
 
 void t1() __attribute__((naked));
 
-void t2() __attribute__((naked(2))); // expected-error {{attribute requires 0 argument(s)}}
+void t2() __attribute__((naked(2))); // expected-error {{attribute takes no arguments}}
 
diff --git a/clang/test/Sema/attr-nodebug.c b/clang/test/Sema/attr-nodebug.c
index 6865de0..a66e961 100644
--- a/clang/test/Sema/attr-nodebug.c
+++ b/clang/test/Sema/attr-nodebug.c
@@ -4,5 +4,5 @@
 
 void t1() __attribute__((nodebug));
 
-void t2() __attribute__((nodebug(2))); // expected-error {{attribute requires 0 argument(s)}}
+void t2() __attribute__((nodebug(2))); // expected-error {{attribute takes no arguments}}
 
diff --git a/clang/test/Sema/attr-noinline.c b/clang/test/Sema/attr-noinline.c
index 8c91b65..dfc88a8 100644
--- a/clang/test/Sema/attr-noinline.c
+++ b/clang/test/Sema/attr-noinline.c
@@ -4,5 +4,5 @@
 
 void t1() __attribute__((noinline));
 
-void t2() __attribute__((noinline(2))); // expected-error {{attribute requires 0 argument(s)}}
+void t2() __attribute__((noinline(2))); // expected-error {{attribute takes no arguments}}
 
diff --git a/clang/test/Sema/attr-noreturn.c b/clang/test/Sema/attr-noreturn.c
index 5333a2c..5c643ff 100644
--- a/clang/test/Sema/attr-noreturn.c
+++ b/clang/test/Sema/attr-noreturn.c
@@ -13,7 +13,7 @@
 
 int g0 __attribute__((noreturn)); // expected-warning {{'noreturn' only applies to function types; type here is 'int'}}
 
-int f2() __attribute__((noreturn(1, 2))); // expected-error {{attribute requires 0 argument(s)}}
+int f2() __attribute__((noreturn(1, 2))); // expected-error {{attribute takes no arguments}}
 
 void f3() __attribute__((noreturn));
 void f3() {
@@ -41,4 +41,4 @@
   x();
 }
 
-typedef void (*Fun)(void) __attribute__ ((noreturn(2))); // expected-error {{attribute requires 0 argument(s)}}
+typedef void (*Fun)(void) __attribute__ ((noreturn(2))); // expected-error {{attribute takes no arguments}}
diff --git a/clang/test/Sema/attr-regparm.c b/clang/test/Sema/attr-regparm.c
index 4049e0e..642c07e 100644
--- a/clang/test/Sema/attr-regparm.c
+++ b/clang/test/Sema/attr-regparm.c
@@ -4,7 +4,7 @@
 __attribute((regparm(1.0))) int x1(void); // expected-error{{'regparm' attribute requires integer constant}}
 __attribute((regparm(-1))) int x2(void); // expected-error{{'regparm' parameter must be between 0 and 3 inclusive}}
 __attribute((regparm(5))) int x3(void); // expected-error{{'regparm' parameter must be between 0 and 3 inclusive}}
-__attribute((regparm(5,3))) int x4(void); // expected-error{{attribute requires 1 argument(s)}}
+__attribute((regparm(5,3))) int x4(void); // expected-error{{attribute takes one argument}}
 
 void __attribute__((regparm(3))) x5(int);
 void x5(int); // expected-note{{previous declaration is here}}
diff --git a/clang/test/Sema/attr-unused.c b/clang/test/Sema/attr-unused.c
index 6a7ea95..07c65cb 100644
--- a/clang/test/Sema/attr-unused.c
+++ b/clang/test/Sema/attr-unused.c
@@ -9,7 +9,7 @@
 
 int g0 __attribute__((unused));
 
-int f2() __attribute__((unused(1, 2))); // expected-error {{attribute requires 0 argument(s)}}
+int f2() __attribute__((unused(1, 2))); // expected-error {{attribute takes no arguments}}
 
 struct Test0_unused {} __attribute__((unused));
 struct Test0_not_unused {};
diff --git a/clang/test/Sema/callingconv.c b/clang/test/Sema/callingconv.c
index 92a2057..25669f0 100644
--- a/clang/test/Sema/callingconv.c
+++ b/clang/test/Sema/callingconv.c
@@ -6,7 +6,7 @@
 void __attribute__((stdcall)) bar(float *a) { 
 }
 
-void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{attribute requires 0 argument(s)}}
+void __attribute__((fastcall(1))) baz(float *a) { // expected-error {{attribute takes no arguments}}
 }
 
 void __attribute__((fastcall)) test0() { // expected-error {{function with no prototype cannot use fastcall calling convention}}
@@ -20,7 +20,7 @@
 
 void __attribute__((cdecl)) ctest0() {}
 
-void __attribute__((cdecl(1))) ctest1(float x) {} // expected-error {{attribute requires 0 argument(s)}}
+void __attribute__((cdecl(1))) ctest1(float x) {} // expected-error {{attribute takes no arguments}}
 
 void (__attribute__((fastcall)) *pfoo)(float*) = foo;
 
diff --git a/clang/test/Sema/constructor-attribute.c b/clang/test/Sema/constructor-attribute.c
index 2decebb..3825916 100644
--- a/clang/test/Sema/constructor-attribute.c
+++ b/clang/test/Sema/constructor-attribute.c
@@ -3,13 +3,13 @@
 int x __attribute__((constructor)); // expected-warning {{'constructor' attribute only applies to functions}}
 int f() __attribute__((constructor));
 int f() __attribute__((constructor(1)));
-int f() __attribute__((constructor(1,2))); // expected-error {{attribute requires 0 or 1 argument(s)}}
+int f() __attribute__((constructor(1,2))); // expected-error {{attribute takes no more than 1 argument}}
 int f() __attribute__((constructor(1.0))); // expected-error {{'constructor' attribute requires parameter 1 to be an integer constant}}
 
 int x __attribute__((destructor)); // expected-warning {{'destructor' attribute only applies to functions}}
 int f() __attribute__((destructor));
 int f() __attribute__((destructor(1)));
-int f() __attribute__((destructor(1,2))); // expected-error {{attribute requires 0 or 1 argument(s)}}
+int f() __attribute__((destructor(1,2))); // expected-error {{attribute takes no more than 1 argument}}
 int f() __attribute__((destructor(1.0))); // expected-error {{'destructor' attribute requires parameter 1 to be an integer constant}}
 
 
diff --git a/clang/test/Sema/neon-vector-types.c b/clang/test/Sema/neon-vector-types.c
index 1f50177..cbf0133 100644
--- a/clang/test/Sema/neon-vector-types.c
+++ b/clang/test/Sema/neon-vector-types.c
@@ -16,7 +16,7 @@
 typedef __attribute__((neon_polyvector_type(8)))  poly16_t poly16x8_t;
 
 // The attributes must have a single argument.
-typedef __attribute__((neon_vector_type(2, 4))) int only_one_arg; // expected-error{{attribute requires 1 argument(s)}}
+typedef __attribute__((neon_vector_type(2, 4))) int only_one_arg; // expected-error{{attribute takes one argument}}
 
 // The number of elements must be an ICE.
 typedef __attribute__((neon_vector_type(2.0))) int non_int_width; // expected-error{{attribute requires integer constant}}
diff --git a/clang/test/Sema/sentinel-attribute.c b/clang/test/Sema/sentinel-attribute.c
index ed0ef89..e5cbf6e 100644
--- a/clang/test/Sema/sentinel-attribute.c
+++ b/clang/test/Sema/sentinel-attribute.c
@@ -5,7 +5,7 @@
 void f2(int a, ...) __attribute__ ((sentinel(1)));
 
 void f3(int a, ...) __attribute__ ((sentinel("hello"))); //expected-error{{'sentinel' attribute requires parameter 1 to be an integer constant}}
-void f4(int a, ...) __attribute__ ((sentinel(1, 2, 3))); //expected-error{{attribute requires 0, 1 or 2 argument(s)}}
+void f4(int a, ...) __attribute__ ((sentinel(1, 2, 3))); //expected-error{{attribute takes no more than 2 arguments}}
 void f4(int a, ...) __attribute__ ((sentinel(-1))); //expected-error{{parameter 1 less than zero}}
 void f4(int a, ...) __attribute__ ((sentinel(0, 2))); // expected-error{{parameter 2 not 0 or 1}}