courbet added inline comments.
================
Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:26
+ binaryOperator(
+ anyOf(hasOperatorName("+="), hasOperatorName("-=")),
+ hasLHS(hasType(isInteger())),
----------------
aaron.ballman wrote:
> Why only these two operators? This does not match the behavior from the C++
> Core Guideline check itself
> (https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Res-narrowing).
These provided the best signal to noise ratio. Also they are the most dangerous
(in a loop, you might end up losing one unit per iteration). I'll add other
operators later if that's fine with you.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D38455
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits