[PATCH] D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 10 09:36:35 PDT 2018


JonasToth added inline comments.


================
Comment at: clang-tidy/hicpp/SignedBitwiseCheck.cpp:92
+  if (N.getNodeAs<NamedDecl>("std_type"))
+    diag(Location, "shifting a value of the standardized bitmask types");
+  else
----------------
aaron.ballman wrote:
> How about: "shifting a value of bitmask type"
Not sure about that.

The general bitmasks are covered by the second `diag`. 

This one should only trigger if a shift with the standardized bitmask types occurs. This exception is necessary because those are allowed for the other bitwise operations(&, |, ^), but i decided that shifting them makes no sense. 


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45414





More information about the cfe-commits mailing list