]> granicus.if.org Git - clang/commitdiff
Remove the argument number from the constant integer diagnostic.
authorEric Christopher <echristo@apple.com>
Mon, 19 Apr 2010 18:23:02 +0000 (18:23 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 19 Apr 2010 18:23:02 +0000 (18:23 +0000)
Update all of the testcases accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101795 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaChecking.cpp
test/Sema/builtin-prefetch.c
test/Sema/builtin-stackaddress.c
test/Sema/builtins.c
test/Sema/x86-builtin-palignr.c

index ba8008d0b63b4237b6da9fcf89ff1581bf834d3c..71e67270b50a810333395a147d4dbb45edb136f2 100644 (file)
@@ -2864,7 +2864,7 @@ def err_builtin_longjmp_invalid_val : Error<
   "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">;
index b1eb756d4673ee4e99b639c46f6d820769dbda66..5056e3172b5c02914bd90b9ac620c0c1742a56f1 100644 (file)
@@ -743,7 +743,7 @@ bool Sema::SemaBuiltinConstantArg(CallExpr *TheCall, int ArgNum,
   
   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;
 }
index 424d47e903cfffb49b13f7e3f3a3a6702b4a08f5..c5fa792a56636b35ebbff44fdd7dd526394e2834 100644 (file)
@@ -6,8 +6,8 @@ void foo() {
   __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 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, "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}}
index 29e4e4fa6caa357ea039ad64ae17e0bb5fcfb92a..5f63bb114624f401dd4fafd65bc31d17bc94a7f1 100644 (file)
@@ -4,7 +4,7 @@ return __builtin_return_address(0);
 }
 
 void b(unsigned x) {
-return __builtin_return_address(x); // expected-error{{argument 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 @@ return __builtin_frame_address(0);
 }
 
 void d(unsigned x) {
-return __builtin_frame_address(x); // expected-error{{argument 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}}
 }
index dbb308e4debc7da238710b18f5c80a6be035ce1e..6fa563b31137b530439039a8e5259373b39a4b90 100644 (file)
@@ -60,7 +60,7 @@ void test11(int X) {
     break;
   }
 
-  __builtin_eh_return_data_regno(X);  // expected-error {{argument 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
index 832b54b93f51bcb724eae8f240edc0d039747464..bbd3a913e90bd0211bae921e234588e6e92b6562 100644 (file)
@@ -4,5 +4,5 @@
 
 __m64 foo(__m64 a, __m64 b, int c)
 {
-   return _mm_alignr_pi8(a, b, c); // expected-error {{argument 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}}
 }