]> granicus.if.org Git - clang/commitdiff
Fixes text of diagnostics in integer overflow patch.
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 24 Jan 2013 23:24:32 +0000 (23:24 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 24 Jan 2013 23:24:32 +0000 (23:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173388 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticASTKinds.td
test/Sema/switch-1.c

index a54f39e1ee0ff08b38e4bf148ddfc07594dcd633..7074e02ad335f7ffce2295648cf1849545c02395 100644 (file)
@@ -107,7 +107,7 @@ def note_constexpr_calls_suppressed : Note<
   "see all)">;
 def note_constexpr_call_here : Note<"in call to '%0'">;
 def warn_integer_constant_overflow : Warning<
-  "overflow in case constant expression results in value %0 of type %1">,
+  "overflow of constant expression results in value %0 of type %1">,
   InGroup<DiagGroup<"integer-overflow">>;
 
 // inline asm related.
index bcf30a8d500bee88e42654fe6dda18b1a07b7547..50129c3ee215e307620a2e5cf7245b7ec63c6ed9 100644 (file)
@@ -4,11 +4,11 @@
 
 int f(int i) {
   switch (i) {
-    case 2147483647 + 2: // expected-warning {{overflow in case constant expression results in value -2147483647 of type 'int'}}
+    case 2147483647 + 2: // expected-warning {{overflow of constant expression results in value -2147483647 of type 'int'}}
       return 1;
-    case 9223372036854775807L * 4: // expected-warning {{overflow in case constant expression results in value -4 of type 'long'}}
+    case 9223372036854775807L * 4: // expected-warning {{overflow of constant expression results in value -4 of type 'long'}}
       return 2;
-    case (123456 *789012) + 1:  // expected-warning {{overflow in case constant expression results in value -1375982336 of type 'int'}}
+    case (123456 *789012) + 1:  // expected-warning {{overflow of constant expression results in value -1375982336 of type 'int'}}
       return 3;
     case 2147483647:
       return 0;