r373818 - [NFCI] Slightly improve warning message

David Bolvansky via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 5 01:09:06 PDT 2019


Author: xbolva00
Date: Sat Oct  5 01:09:06 2019
New Revision: 373818

URL: http://llvm.org/viewvc/llvm-project?rev=373818&view=rev
Log:
[NFCI] Slightly improve warning message


Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/SemaCXX/warn-xor-as-pow.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=373818&r1=373817&r2=373818&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Sat Oct  5 01:09:06 2019
@@ -3402,7 +3402,7 @@ def warn_address_of_reference_bool_conve
   InGroup<UndefinedBoolConversion>;
 
 def warn_xor_used_as_pow : Warning<
-  "result of '%0' is %1; did you mean an exponentiation?">,
+  "result of '%0' is %1; did you mean exponentiation?">,
   InGroup<XorUsedAsPow>;
 def warn_xor_used_as_pow_base_extra : Warning<
   "result of '%0' is %1; did you mean '%2' (%3)?">,

Modified: cfe/trunk/test/SemaCXX/warn-xor-as-pow.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/warn-xor-as-pow.cpp?rev=373818&r1=373817&r2=373818&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/warn-xor-as-pow.cpp (original)
+++ cfe/trunk/test/SemaCXX/warn-xor-as-pow.cpp Sat Oct  5 01:09:06 2019
@@ -79,7 +79,7 @@ void test(unsigned a, unsigned b) {
   res = 2 ^ 32; // expected-warning {{result of '2 ^ 32' is 34; did you mean '1LL << 32'?}}
   // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:9-[[@LINE-1]]:15}:"1LL << 32"
   // expected-note at -2 {{replace expression with '0x2 ^ 32' or use 'xor' instead of '^' to silence this warning}}
-  res = 2 ^ 64; // expected-warning {{result of '2 ^ 64' is 66; did you mean an exponentiation?}}
+  res = 2 ^ 64; // expected-warning {{result of '2 ^ 64' is 66; did you mean exponentiation?}}
   // expected-note at -1 {{replace expression with '0x2 ^ 64' or use 'xor' instead of '^' to silence this warning}}
   res = 2 ^ 65;
 




More information about the cfe-commits mailing list