[PATCH] D114105: [clang-tidy] Ignore narrowing conversions in case of bitfields
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 25 03:10:33 PST 2021
steakhal added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-bitfields.cpp:1
+// RUN: %check_clang_tidy %s cppcoreguidelines-narrowing-conversions %t \
+// RUN: -std=c++17 -- -target x86_64-unknown-linux
----------------
courbet wrote:
> Can you add a test with:
>
> ```
>
> void takesInt(int);
>
> ...
>
> takesInt(x.id);
> ```
>
> I think this suffers from the same problem currently.
Sure, great idea! It actually revealed a logical flaw. Thanks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114105/new/
https://reviews.llvm.org/D114105
More information about the cfe-commits
mailing list