cppcoreguidelines Narrowing Conversions Check: detect narrowing conversions involving...
authorEric Seidel <eric@seidel.io>
Tue, 8 Dec 2020 18:09:12 +0000 (13:09 -0500)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 8 Dec 2020 18:10:41 +0000 (13:10 -0500)
commitc6348e8c95ee1eaa9dd2322b278def7a4127ff26
treee62f2f57b2495cb4b9b5cb75df2f76f4cd7c2a62
parentd7e71b5db8427309ad12249633ea86cccdc5a701
cppcoreguidelines Narrowing Conversions Check: detect narrowing conversions involving typedefs

The check 'cppcoreguidelines-narrowing-conversions' does not detect conversions
involving typedef. This notably includes the standard fixed-width integer types
like int32_t, uint64_t, etc. Now look through the typedefs at the desugared type.
clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions.cpp