================
@@ -195,3 +195,59 @@ unsigned invalid_popcount_bitset(unsigned x, signed y) {
};
}
+
+/*
+ * rotate patterns
+ */
+unsigned char rotate_left_pattern(unsigned char x) {
+ // CHECK-MESSAGES: :[[@LINE+2]]:10: warning: use 'std::rotl' instead
[modernize-use-std-bit]
+ // CHECK-FIXES: return (int)std::rotl(x, 3);
----------------
localspook wrote:
I think it may be better to just not bother with adding the `int` cast. In most
cases, it's just noise. Yes, not adding it means that you could come up with a
pathological case where the fix-it changes program semantics, but I think we
should optimize for the common case, where it's not needed.
https://github.com/llvm/llvm-project/pull/186324
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits