[PATCH] D50389: [clang-tidy] new check for Abseil
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 8 05:30:51 PDT 2018
hokein added a comment.
Thanks for contributing to clang-tidy!
================
Comment at: docs/clang-tidy/checks/abseil-duration-division.rst:3
+
+abseil-duration-division
+========================
----------------
This is a nice document. Does abseil have similar thing in its official guideline/practice? If yes, we can add the link in the document as well.
================
Comment at: test/clang-tidy/abseil-duration-division.cpp:21
+#define CHECK(x) (x)
+
+void Positives() {
----------------
JonasToth wrote:
> What happens on this snippet:
>
> ```
> const auto SomeVal = 1.0 + d / d; // auto deduces to a double?! so it should be considered as relevant
> const auto AnotherVal = 1 + d / d; // Here everything will be an integer, so interesting as well
> ```
>
+1, we need to add more test cases.
https://reviews.llvm.org/D50389
More information about the cfe-commits
mailing list