Remove the argument number from the constant integer diagnostic.
Update all of the testcases accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101795 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index ba8008d..71e6727 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -2864,7 +2864,7 @@
   "argument to __builtin_longjmp must be a constant 1">;
 
 def err_constant_integer_arg_type : Error<
-  "argument %0 to %1 must be a constant integer">;
+  "argument to %0 must be a constant integer">;
 
 def ext_mixed_decls_code : Extension<
   "ISO C90 forbids mixing declarations and code">;
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index b1eb756..5056e31 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -743,7 +743,7 @@
   
   if (!Arg->isIntegerConstantExpr(Result, Context))
     return Diag(TheCall->getLocStart(), diag::err_constant_integer_arg_type)
-                << ArgNum << FDecl->getDeclName() <<  Arg->getSourceRange();
+                << FDecl->getDeclName() <<  Arg->getSourceRange();
   
   return false;
 }
diff --git a/test/Sema/builtin-prefetch.c b/test/Sema/builtin-prefetch.c
index 424d47e..c5fa792 100644
--- a/test/Sema/builtin-prefetch.c
+++ b/test/Sema/builtin-prefetch.c
@@ -6,8 +6,8 @@
   __builtin_prefetch(&a, 1);
   __builtin_prefetch(&a, 1, 2);
   __builtin_prefetch(&a, 1, 9, 3); // expected-error{{too many arguments to function}}
-  __builtin_prefetch(&a, "hello", 2); // expected-error{{argument 1 to '__builtin_prefetch' must be a constant integer}}
-  __builtin_prefetch(&a, a, 2); // expected-error{{argument 1 to '__builtin_prefetch' must be a constant integer}}
+  __builtin_prefetch(&a, "hello", 2); // expected-error{{argument to '__builtin_prefetch' must be a constant integer}}
+  __builtin_prefetch(&a, a, 2); // expected-error{{argument to '__builtin_prefetch' must be a constant integer}}
   __builtin_prefetch(&a, 2); // expected-error{{argument should be a value from 0 to 1}}
   __builtin_prefetch(&a, 0, 4); // expected-error{{argument should be a value from 0 to 3}}
   __builtin_prefetch(&a, -1, 4); // expected-error{{argument should be a value from 0 to 1}}
diff --git a/test/Sema/builtin-stackaddress.c b/test/Sema/builtin-stackaddress.c
index 29e4e4f..5f63bb1 100644
--- a/test/Sema/builtin-stackaddress.c
+++ b/test/Sema/builtin-stackaddress.c
@@ -4,7 +4,7 @@
 }
 
 void b(unsigned x) {
-return __builtin_return_address(x); // expected-error{{argument 0 to '__builtin_return_address' must be a constant integer}}
+return __builtin_return_address(x); // expected-error{{argument to '__builtin_return_address' must be a constant integer}}
 }
 
 void* c(unsigned x) {
@@ -12,5 +12,5 @@
 }
 
 void d(unsigned x) {
-return __builtin_frame_address(x); // expected-error{{argument 0 to '__builtin_frame_address' must be a constant integer}}
+return __builtin_frame_address(x); // expected-error{{argument to '__builtin_frame_address' must be a constant integer}}
 }
diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c
index dbb308e..6fa563b 100644
--- a/test/Sema/builtins.c
+++ b/test/Sema/builtins.c
@@ -60,7 +60,7 @@
     break;
   }
 
-  __builtin_eh_return_data_regno(X);  // expected-error {{argument 0 to '__builtin_eh_return_data_regno' must be a constant integer}}
+  __builtin_eh_return_data_regno(X);  // expected-error {{argument to '__builtin_eh_return_data_regno' must be a constant integer}}
 }
 
 // PR5062
diff --git a/test/Sema/x86-builtin-palignr.c b/test/Sema/x86-builtin-palignr.c
index 832b54b..bbd3a91 100644
--- a/test/Sema/x86-builtin-palignr.c
+++ b/test/Sema/x86-builtin-palignr.c
@@ -4,5 +4,5 @@
 
 __m64 foo(__m64 a, __m64 b, int c)
 {
-   return _mm_alignr_pi8(a, b, c); // expected-error {{argument 2 to '__builtin_ia32_palignr' must be a constant integer}}
+   return _mm_alignr_pi8(a, b, c); // expected-error {{argument to '__builtin_ia32_palignr' must be a constant integer}}
 }