[PATCH] D36586: [clang-tidy] hicpp bitwise operations on signed integers
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 30 06:06:03 PDT 2017
JonasToth marked an inline comment as done.
JonasToth added inline comments.
================
Comment at: test/clang-tidy/hicpp-signed-bitwise.cpp:205
+
+#if 0
+// Scoped Enums must define their operations, so the overloaded operators must take care
----------------
aaron.ballman wrote:
> I don't think it helps to have this code remain in the test case.
>
> Can you add tests for the following?
> ```
> int i1 = 1 << 12;
> int i2 = 1u << 12;
>
> enum E {
> one = 1,
> two = 2,
> test1 = 1 << 12,
> test2 = one << two,
> test3 = 1u << 12
> };
> ```
the first two cases `int i1 ...` are in the first function of this file( `binary_bitwise`).
https://reviews.llvm.org/D36586
More information about the cfe-commits
mailing list