[PATCH] D53488: [clang-tidy] Catching narrowing from double to float.

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 30 08:45:16 PDT 2018


JonasToth requested changes to this revision.
JonasToth added a comment.
This revision now requires changes to proceed.

because this now diverged quite a bit i will revert the lgtm for now and take a longer look at the new patch.
The numbers you reported sound good.



================
Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:32
 
-  const auto IsFloatExpr =
-      expr(hasType(realFloatingPointType()), unless(IsCeilFloorCall));
+  const auto IsBuiltinOrEnumType = anyOf(builtinType(), enumType());
 
----------------
This matcher seems no to be used, did I overlook sth?


================
Comment at: docs/ReleaseNotes.rst:77
 
 - New :doc:`abseil-duration-factory-float
   <clang-tidy/checks/abseil-duration-factory-float>` check.
----------------
that seems to be unrelated


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53488





More information about the cfe-commits mailing list