Added the attribute name to the err_attribute_wrong_number_arguments diagnostic for clarity; updated almost all of the affected test cases.

Thanks to Fariborz Jahanian for the suggestion!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186980 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/attr-no-sanitize-address.cpp b/test/SemaCXX/attr-no-sanitize-address.cpp
index dc4d797..f180349 100644
--- a/test/SemaCXX/attr-no-sanitize-address.cpp
+++ b/test/SemaCXX/attr-no-sanitize-address.cpp
@@ -9,7 +9,7 @@
 void noanal_fun() NO_SANITIZE_ADDRESS;
 
 void noanal_fun_args() __attribute__((no_sanitize_address(1))); // \
-  // expected-error {{attribute takes no arguments}}
+  // expected-error {{'no_sanitize_address' attribute takes no arguments}}
 
 int noanal_testfn(int y) NO_SANITIZE_ADDRESS;
 
diff --git a/test/SemaCXX/attr-no-sanitize-memory.cpp b/test/SemaCXX/attr-no-sanitize-memory.cpp
index 84acdac..d6eca1b 100644
--- a/test/SemaCXX/attr-no-sanitize-memory.cpp
+++ b/test/SemaCXX/attr-no-sanitize-memory.cpp
@@ -9,7 +9,7 @@
 void noanal_fun() NO_SANITIZE_MEMORY;
 
 void noanal_fun_args() __attribute__((no_sanitize_memory(1))); // \
-  // expected-error {{attribute takes no arguments}}
+  // expected-error {{'no_sanitize_memory' attribute takes no arguments}}
 
 int noanal_testfn(int y) NO_SANITIZE_MEMORY;
 
diff --git a/test/SemaCXX/attr-no-sanitize-thread.cpp b/test/SemaCXX/attr-no-sanitize-thread.cpp
index 50960c4..d6372bc 100644
--- a/test/SemaCXX/attr-no-sanitize-thread.cpp
+++ b/test/SemaCXX/attr-no-sanitize-thread.cpp
@@ -9,7 +9,7 @@
 void noanal_fun() NO_SANITIZE_THREAD;
 
 void noanal_fun_args() __attribute__((no_sanitize_thread(1))); // \
-  // expected-error {{attribute takes no arguments}}
+  // expected-error {{'no_sanitize_thread' attribute takes no arguments}}
 
 int noanal_testfn(int y) NO_SANITIZE_THREAD;
 
diff --git a/test/SemaCXX/init-priority-attr.cpp b/test/SemaCXX/init-priority-attr.cpp
index 6facebf..1365953 100644
--- a/test/SemaCXX/init-priority-attr.cpp
+++ b/test/SemaCXX/init-priority-attr.cpp
@@ -19,7 +19,7 @@
 
 Two foo __attribute__((init_priority(101))) ( 5, 6 );
 
-Two goo __attribute__((init_priority(2,3))) ( 5, 6 ); // expected-error {{attribute takes one argument}}
+Two goo __attribute__((init_priority(2,3))) ( 5, 6 ); // expected-error {{'init_priority' attribute takes one argument}}
 
 Two coo[2]  __attribute__((init_priority(3)));	// expected-error {{init_priority attribute requires integer constant between 101 and 65535 inclusive}}
 
diff --git a/test/SemaCXX/warn-thread-safety-parsing.cpp b/test/SemaCXX/warn-thread-safety-parsing.cpp
index 83db05b..16ac422 100644
--- a/test/SemaCXX/warn-thread-safety-parsing.cpp
+++ b/test/SemaCXX/warn-thread-safety-parsing.cpp
@@ -103,7 +103,7 @@
 void noanal_fun() NO_THREAD_SAFETY_ANALYSIS;
 
 void noanal_fun_args() __attribute__((no_thread_safety_analysis(1))); // \
-  // expected-error {{attribute takes no arguments}}
+  // expected-error {{'no_thread_safety_analysis' attribute takes no arguments}}
 
 int noanal_testfn(int y) NO_THREAD_SAFETY_ANALYSIS;
 
@@ -142,13 +142,13 @@
 int gv_var_noargs GUARDED_VAR;
 
 int gv_var_args __attribute__((guarded_var(1))); // \
-  // expected-error {{attribute takes no arguments}}
+  // expected-error {{'guarded_var' attribute takes no arguments}}
 
 class GVFoo {
  private:
   int gv_field_noargs GUARDED_VAR;
   int gv_field_args __attribute__((guarded_var(1))); // \
-    // expected-error {{attribute takes no arguments}}
+    // expected-error {{'guarded_var' attribute takes no arguments}}
 };
 
 class GUARDED_VAR GV { // \
@@ -188,7 +188,7 @@
   int field_noargs PT_GUARDED_VAR; // \
     // expected-warning {{'pt_guarded_var' only applies to pointer types; type here is 'int'}}
   int *gv_field_args __attribute__((pt_guarded_var(1))); // \
-    // expected-error {{attribute takes no arguments}}
+    // expected-error {{'pt_guarded_var' attribute takes no arguments}}
 };
 
 class PT_GUARDED_VAR PGV { // \
@@ -196,7 +196,7 @@
 };
 
 int *pgv_var_args __attribute__((pt_guarded_var(1))); // \
-  // expected-error {{attribute takes no arguments}}
+  // expected-error {{'pt_guarded_var' attribute takes no arguments}}
 
 
 void pgv_function() PT_GUARDED_VAR; // \
@@ -225,7 +225,7 @@
 };
 
 class __attribute__((lockable (1))) LTestClass_args { // \
-    // expected-error {{attribute takes no arguments}}
+    // expected-error {{'lockable' attribute takes no arguments}}
 };
 
 void l_test_function() LOCKABLE;  // \
@@ -265,7 +265,7 @@
 };
 
 class __attribute__((scoped_lockable (1))) SLTestClass_args { // \
-  // expected-error {{attribute takes no arguments}}
+  // expected-error {{'scoped_lockable' attribute takes no arguments}}
 };
 
 void sl_test_function() SCOPED_LOCKABLE;  // \
@@ -308,15 +308,15 @@
 int gb_var_arg GUARDED_BY(mu1);
 
 int gb_var_args __attribute__((guarded_by(mu1, mu2))); // \
-  // expected-error {{attribute takes one argument}}
+  // expected-error {{'guarded_by' attribute takes one argument}}
 
 int gb_var_noargs __attribute__((guarded_by)); // \
-  // expected-error {{attribute takes one argument}}
+  // expected-error {{'guarded_by' attribute takes one argument}}
 
 class GBFoo {
  private:
   int gb_field_noargs __attribute__((guarded_by)); // \
-    // expected-error {{attribute takes one argument}}
+    // expected-error {{'guarded_by' attribute takes one argument}}
   int gb_field_args GUARDED_BY(mu1);
 };
 
@@ -374,12 +374,12 @@
 //1. Check applied to the right types & argument number
 
 int *pgb_var_noargs __attribute__((pt_guarded_by)); // \
-  // expected-error {{attribute takes one argument}}
+  // expected-error {{'pt_guarded_by' attribute takes one argument}}
 
 int *pgb_ptr_var_arg PT_GUARDED_BY(mu1);
 
 int *pgb_ptr_var_args __attribute__((pt_guarded_by(mu1, mu2))); // \
-  // expected-error {{attribute takes one argument}}
+  // expected-error {{'pt_guarded_by' attribute takes one argument}}
 
 int pgb_var_args PT_GUARDED_BY(mu1); // \
   // expected-warning {{'pt_guarded_by' only applies to pointer types; type here is 'int'}}
@@ -387,7 +387,7 @@
 class PGBFoo {
  private:
   int *pgb_field_noargs __attribute__((pt_guarded_by)); // \
-    // expected-error {{attribute takes one argument}}
+    // expected-error {{'pt_guarded_by' attribute takes one argument}}
   int *pgb_field_args PT_GUARDED_BY(mu1);
 };
 
@@ -931,12 +931,12 @@
 // Takes exactly one argument, a var/field
 
 void lr_function() __attribute__((lock_returned)); // \
-  // expected-error {{attribute takes one argument}}
+  // expected-error {{'lock_returned' attribute takes one argument}}
 
 void lr_function_arg() LOCK_RETURNED(mu1);
 
 void lr_function_args() __attribute__((lock_returned(mu1, mu2))); // \
-  // expected-error {{attribute takes one argument}}
+  // expected-error {{'lock_returned' attribute takes one argument}}
 
 int lr_testfn(int y) LOCK_RETURNED(mu1);