Author: jonastoth Date: Wed Apr 11 03:22:25 2018 New Revision: 329790 URL: http://llvm.org/viewvc/llvm-project?rev=329790&view=rev Log: [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. Modified: clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-standard-types.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-standard-types.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-standard-types.cpp?rev=329790&r1=329789&r2=329790&view=diff ============================================================================== --- clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-standard-types.cpp (original) +++ clang-tools-extra/trunk/test/clang-tidy/hicpp-signed-bitwise-standard-types.cpp Wed Apr 11 03:22:25 2018 @@ -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; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits