[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 20 09:30:05 PDT 2018


aaron.ballman added inline comments.


================
Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:26
+      binaryOperator(
+          anyOf(hasOperatorName("+="), hasOperatorName("-=")),
+          hasLHS(hasType(isInteger())),
----------------
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).


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D38455





More information about the cfe-commits mailing list