This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE355024: [clang-tidy] Add the abseil-time-subtraction check
(authored by hwright, committed by ).
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58137/new/
h
JonasToth accepted this revision.
JonasToth added a comment.
This revision is now accepted and ready to land.
I am happy now :)
Thank you for the patch, LGTM
Comment at: test/clang-tidy/abseil-time-subtraction.cpp:12
+
+ d = absl::Hours(absl::ToUnixHours(t) - x);
+ // CHECK-M
hwright marked an inline comment as done.
hwright added inline comments.
Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:97
+void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) {
+ const auto *BinOp = Result.Nodes.getNodeAs("binop");
+ std::string in
hwright updated this revision to Diff 188372.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58137/new/
https://reviews.llvm.org/D58137
Files:
clang-tidy/abseil/AbseilTidyModule.cpp
clang-tidy/abseil/CMakeLists.txt
clang-tidy/abseil/DurationRewriter.cpp
clang-tidy/abseil/DurationR
hwright added inline comments.
Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:97
+void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) {
+ const auto *BinOp = Result.Nodes.getNodeAs("binop");
+ std::string inverse_name =
JonasToth wr
hwright updated this revision to Diff 188289.
hwright marked 5 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58137/new/
https://reviews.llvm.org/D58137
Files:
clang-tidy/abseil/AbseilTidyModule.cpp
clang-tidy/abseil/CMakeLists.txt
clang-tidy/abseil/Duration
JonasToth added inline comments.
Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:97
+void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) {
+ const auto *BinOp = Result.Nodes.getNodeAs("binop");
+ std::string inverse_name =
hwright wr
hwright added inline comments.
Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:97
+void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) {
+ const auto *BinOp = Result.Nodes.getNodeAs("binop");
+ std::string inverse_name =
JonasToth wr
hwright updated this revision to Diff 187967.
hwright marked 15 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58137/new/
https://reviews.llvm.org/D58137
Files:
clang-tidy/abseil/AbseilTidyModule.cpp
clang-tidy/abseil/CMakeLists.txt
clang-tidy/abseil/Duratio
JonasToth added inline comments.
Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:72
+
+// Match the cases where we know that the result is a Duration and the
first
+// argument is a Time. Just knowing the type of the first operand is not
Eugene.Z
Eugene.Zelenko added inline comments.
Comment at: clang-tidy/abseil/TimeSubtractionCheck.cpp:72
+
+// Match the cases where we know that the result is a Duration and the
first
+// argument is a Time. Just knowing the type of the first operand is not
Jon
JonasToth added inline comments.
Comment at: clang-tidy/abseil/DurationRewriter.cpp:92
+ DurationScale Scale, const Expr &Node) {
+ const llvm::StringRef &InverseFunction = getTimeInverseForScale(Scale);
+ if (const auto *MaybeCallArg = selectFirst(
--
hwright updated this revision to Diff 186569.
hwright marked 3 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58137/new/
https://reviews.llvm.org/D58137
Files:
clang-tidy/abseil/AbseilTidyModule.cpp
clang-tidy/abseil/CMakeLists.txt
clang-tidy/abseil/Duration
Eugene.Zelenko added inline comments.
Comment at: docs/ReleaseNotes.rst:91
+
+ Finds and fixes `absl::Time` subtraction expressions to do subtraction
+ in the Time domain instead of the numeric domain.
Please use two not one ` for language constructs.
===
hwright created this revision.
hwright added reviewers: ioeric, hokein, JonasToth, aaron.ballman.
hwright added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, jdoerfert, xazax.hun, mgorny.
Herald added a project: clang.
Repository:
rCTE Clang Tools Extra
https://reviews.ll
15 matches
Mail list logo