[PATCH] D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 14:15:43 PST 2017
JonasToth created this revision.
Herald added subscribers: cfe-commits, kbarton, xazax.hun, mgorny, nemanjai, klimek.
This check implements rules ES.100 and ES.102 of the CppCoreGuidelines
forbidding to mix `signed` and `unsigned` integer types in arithmetic expression.
It currently functions for the "normal" arithmetic but when implicit casts
to its happen for `short` and `char` i have no idea how to implement that
properly. Here some advice would be really helpful.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D40854
Files:
clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tidy/cppcoreguidelines/MixedIntArithmeticCheck.cpp
clang-tidy/cppcoreguidelines/MixedIntArithmeticCheck.h
docs/ReleaseNotes.rst
docs/clang-tidy/checks/cppcoreguidelines-mixed-int-arithmetic.rst
docs/clang-tidy/checks/list.rst
test/clang-tidy/cppcoreguidelines-mixed-int-arithmetic.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40854.125612.patch
Type: text/x-patch
Size: 18479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171205/d5345ae1/attachment-0001.bin>
More information about the cfe-commits
mailing list