hwright marked 5 inline comments as done.
hwright added inline comments.

================
Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:73
+  case DurationScale::Hours:
+    if (Multiplier <= 1.0 / 60.0)
+      return std::make_tuple(DurationScale::Minutes, Multiplier * 60.0);
----------------
aaron.ballman wrote:
> This doesn't seem quite right. `1.0/6000.0` is less than `1.0/60.0` but isn't 
> a `Minutes` scaling.
After spending two days chasing this down, it finally occurred to me: we don't 
actually handle this case.  Our (somewhat conservative) matchers only look for 
literal values, not division expressions like `1.0/60.0`.

And for this iteration of the tool, I think I'm fine with that, since I expect 
those kinds of things to be exceedingly rare, and probably tricky to handle, 
anyway.


https://reviews.llvm.org/D54246



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to