From: David Bolvansky Date: Sat, 5 Oct 2019 08:09:06 +0000 (+0000) Subject: [NFCI] Slightly improve warning message X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a09348e37197a45c00334d48ab26d5f3430a068;p=clang [NFCI] Slightly improve warning message git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373818 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 9aa2792d85..c54380639a 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3402,7 +3402,7 @@ def warn_address_of_reference_bool_conversion : Warning< InGroup; 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; def warn_xor_used_as_pow_base_extra : Warning< "result of '%0' is %1; did you mean '%2' (%3)?">, diff --git a/test/SemaCXX/warn-xor-as-pow.cpp b/test/SemaCXX/warn-xor-as-pow.cpp index e024c288d7..123d0ac5e0 100644 --- a/test/SemaCXX/warn-xor-as-pow.cpp +++ b/test/SemaCXX/warn-xor-as-pow.cpp @@ -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@-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@-1 {{replace expression with '0x2 ^ 64' or use 'xor' instead of '^' to silence this warning}} res = 2 ^ 65;