[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-02-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The code looks good, but I have a concern about the check name -- `double` seems a confusing word, see my comment. Comment at: clang-tidy/abseil/DurationDoubleConversionCheck.cpp:27 + + for (const auto &s : Scales) { +std::string DurationFactory =

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:20 + + + // Original - Conversion to integer and back again hwright wrote: > MyDeveloperDay wrote: > > hwright wrote: > > > Eugene.Zelenko wrote: > > >

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-30 Thread Hyrum Wright via Phabricator via cfe-commits
hwright marked 2 inline comments as done. hwright added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:20 + + + // Original - Conversion to integer and back again MyDeveloperDay wrote: > hwright wrote: > > Eugene.Zelenk

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:20 + + + // Original - Conversion to integer and back again hwright wrote: > Eugene.Zelenko wrote: > > Unnecessary empty line. > This is consistent wit

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-29 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:28 + +Note: Converting to an integer and back to an `absl::Duration` might be a +truncating operation if the value is not aligned to the scale of conversion. E

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-29 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 184146. hwright marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57353/new/ https://reviews.llvm.org/D57353 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/Duration

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:28 + +Note: Converting to an integer and back to an `absl::Duration` might be a +truncating operation if the value is not aligned to the scale of conversion. ---

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-29 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:20 + + + // Original - Conversion to integer and back again Eugene.Zelenko wrote: > Unnecessary empty line. This is consistent with other documentation in thi

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-29 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 184143. hwright marked 5 inline comments as done. hwright added a comment. Address reviewer comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57353/new/ https://reviews.llvm.org/D57353 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-t

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-28 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/abseil/DurationDoubleConversionCheck.cpp:48 + + if (!isNotInMacro(Result, OuterCall)) return; + Please run Clang-format. Comment at: docs/ReleaseNotes.rst:85 + + Find and fix cases

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-28 Thread Hyrum Wright via Phabricator via cfe-commits
hwright created this revision. hwright added reviewers: hokein, JonasToth, aaron.ballman. hwright added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D57353 Files: clang-tidy/abseil/AbseilTi