forked from OSchip/llvm-project
[clang-tidy] fix buildbots from hicpp-signed-bitwise
The applied patch to diagnose assignment operators introduced breakage on some architectures. This patch tries to rectify that. llvm-svn: 329790
This commit is contained in:
parent
0f5f41df93
commit
057f5a1259
|
@ -93,11 +93,16 @@ void still_forbidden() {
|
|||
// Staying within the allowed standard types is ok for bitwise assignment
|
||||
// operations.
|
||||
std::ctype_base::mask var = std::ctype_base::mask::print;
|
||||
var<<= std::ctype_base::mask::upper;
|
||||
var>>= std::ctype_base::mask::upper;
|
||||
var &= std::ctype_base::mask::upper;
|
||||
var |= std::ctype_base::mask::upper;
|
||||
var ^= std::ctype_base::mask::upper;
|
||||
SResult<<= std::ctype_base::mask::upper;
|
||||
// CHECK-MESSAGES: [[@LINE-1]]:13: warning: use of a signed integer operand with a binary bitwise operator
|
||||
SResult>>= std::ctype_base::mask::upper;
|
||||
// CHECK-MESSAGES: [[@LINE-1]]:13: warning: use of a signed integer operand with a binary bitwise operator
|
||||
SResult &= std::ctype_base::mask::upper;
|
||||
// CHECK-MESSAGES: [[@LINE-1]]:13: warning: use of a signed integer operand with a binary bitwise operator
|
||||
SResult |= std::ctype_base::mask::upper;
|
||||
// CHECK-MESSAGES: [[@LINE-1]]:13: warning: use of a signed integer operand with a binary bitwise operator
|
||||
SResult ^= std::ctype_base::mask::upper;
|
||||
// CHECK-MESSAGES: [[@LINE-1]]:13: warning: use of a signed integer operand with a binary bitwise operator
|
||||
|
||||
UResult = std::locale::category::collate << 1u;
|
||||
UResult = std::locale::category::ctype << 1;
|
||||
|
|
Loading…
Reference in New Issue