Finesse 'idempotent operations' analyzer issues to include the opcode of the binary operator for clearer error reporting.  Also remove the 'Idempotent operation' prefix in messages; it's redundant since the bug type is the same.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109527 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/idempotent-operations.c b/test/Analysis/idempotent-operations.c
index 94e972c..74d31e7 100644
--- a/test/Analysis/idempotent-operations.c
+++ b/test/Analysis/idempotent-operations.c
@@ -9,47 +9,47 @@
   int x = 10, zero = 0, one = 1;
 
   // x op x
-  x = x;        // expected-warning {{idempotent operation; both operands are always equal in value}}
-  test(x - x);  // expected-warning {{idempotent operation; both operands are always equal in value}}
-  x -= x;       // expected-warning {{idempotent operation; both operands are always equal in value}}
+  x = x;        // expected-warning {{Assigned value is always the same as the existing value}}
+  test(x - x);  // expected-warning {{Both operands to '-' always have the same value}}
+  x -= x;       // expected-warning {{Both operands to '-=' always have the same value}}
   x = 10;       // no-warning
-  test(x / x);  // expected-warning {{idempotent operation; both operands are always equal in value}}
-  x /= x;       // expected-warning {{idempotent operation; both operands are always equal in value}}
+  test(x / x);  // expected-warning {{Both operands to '/' always have the same value}}
+  x /= x;       // expected-warning {{Both operands to '/=' always have the same value}}
   x = 10;       // no-warning
-  test(x & x);  // expected-warning {{idempotent operation; both operands are always equal in value}}
-  x &= x;       // expected-warning {{idempotent operation; both operands are always equal in value}}
-  test(x | x);  // expected-warning {{idempotent operation; both operands are always equal in value}}
-  x |= x;       // expected-warning {{idempotent operation; both operands are always equal in value}}
+  test(x & x);  // expected-warning {{Both operands to '&' always have the same value}}
+  x &= x;       // expected-warning {{Both operands to '&=' always have the same value}}
+  test(x | x);  // expected-warning {{Both operands to '|' always have the same value}}
+  x |= x;       // expected-warning {{Both operands to '|=' always have the same value}}
 
   // x op 1
-  test(x * one);  // expected-warning {{idempotent operation; the right operand is always 1}}
-  x *= one;       // expected-warning {{idempotent operation; the right operand is always 1}}
-  test(x / one);  // expected-warning {{idempotent operation; the right operand is always 1}}
-  x /= one;       // expected-warning {{idempotent operation; the right operand is always 1}}
+  test(x * one);  // expected-warning {{The right operand to '*' is always 1}}
+  x *= one;       // expected-warning {{The right operand to '*=' is always 1}}
+  test(x / one);  // expected-warning {{The right operand to '/' is always 1}}
+  x /= one;       // expected-warning {{The right operand to '/=' is always 1}}
 
   // 1 op x
-  test(one * x);   // expected-warning {{idempotent operation; the left operand is always 1}}
+  test(one * x);   // expected-warning {{The left operand to '*' is always 1}}
 
   // x op 0
-  test(x + zero);  // expected-warning {{idempotent operation; the right operand is always 0}}
-  test(x - zero);  // expected-warning {{idempotent operation; the right operand is always 0}}
-  test(x * zero);  // expected-warning {{idempotent operation; the right operand is always 0}}
-  test(x & zero);  // expected-warning {{idempotent operation; the right operand is always 0}}
-  test(x | zero);  // expected-warning {{idempotent operation; the right operand is always 0}}
-  test(x ^ zero);  // expected-warning {{idempotent operation; the right operand is always 0}}
-  test(x << zero); // expected-warning {{idempotent operation; the right operand is always 0}}
-  test(x >> zero); // expected-warning {{idempotent operation; the right operand is always 0}}
+  test(x + zero);  // expected-warning {{The right operand to '+' is always 0}}
+  test(x - zero);  // expected-warning {{The right operand to '-' is always 0}}
+  test(x * zero);  // expected-warning {{The right operand to '*' is always 0}}
+  test(x & zero);  // expected-warning {{The right operand to '&' is always 0}}
+  test(x | zero);  // expected-warning {{The right operand to '|' is always 0}}
+  test(x ^ zero);  // expected-warning {{The right operand to '^' is always 0}}
+  test(x << zero); // expected-warning {{The right operand to '<<' is always 0}}
+  test(x >> zero); // expected-warning {{The right operand to '>>' is always 0}}
 
   // 0 op x
-  test(zero + x);  // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero - x);  // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero / x);  // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero * x);  // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero & x);  // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero | x);  // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero ^ x);  // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero << x); // expected-warning {{idempotent operation; the left operand is always 0}}
-  test(zero >> x); // expected-warning {{idempotent operation; the left operand is always 0}}
+  test(zero + x);  // expected-warning {{The left operand to '+' is always 0}}
+  test(zero - x);  // expected-warning {{The left operand to '-' is always 0}}
+  test(zero / x);  // expected-warning {{The left operand to '/' is always 0}}
+  test(zero * x);  // expected-warning {{The left operand to '*' is always 0}}
+  test(zero & x);  // expected-warning {{The left operand to '&' is always 0}}
+  test(zero | x);  // expected-warning {{The left operand to '|' is always 0}}
+  test(zero ^ x);  // expected-warning {{The left operand to '^' is always 0}}
+  test(zero << x); // expected-warning {{The left operand to '<<' is always 0}}
+  test(zero >> x); // expected-warning {{The left operand to '>>' is always 0}}
 }
 
 void floats(float x) {