1. 20 May, 2024 2 commits
    • Revert: Add -Wdead-code-aggressive to ABSL_LLVM_FLAGS · 01283057
      This was supposed to be -Wunreachable-code-aggressive.
      
      PiperOrigin-RevId: 635519833
      Change-Id: I2df1ca9ea8a8bf1060006c2b11602646a26eac61
      Peter Boström committed
    • Add (unused) validation to absl::MockingBitGen · 254b3a53
      `absl::Uniform(tag, rng, a, b)` has some restrictions on the values it can produce in that it will always be in the range specified by `a` and `b`, but these restrictions can be violated by `absl::MockingBitGen`. This makes it easier than necessary to introduce a bug in tests using a mock RNG.
      
      We can fix this by making `MockingBitGen` emit a runtime error if the value produced is out of bounds.
      
      Immediately fixing all the internal buggy uses of `MockingBitGen` is currently infeasible, so the plan is this:
      
       1. Add turned-off validation to `MockingBitGen` to avoid the costs of maintaining unsubmitted code.
       2. Temporarily migrate the internal buggy use cases to keep the current behavior, to be fixed later.
       3. Turn on validation for `MockingBitGen`.
       4. Fix the internal buggy use cases over time.
      
      ---
      
      A few of the different categories of errors I found:
      
       - `Call(tag, rng, a, b) -> a or b`, for open/half-open intervals (i.e. incorrect boundary condition). This case happens quite a lot, e.g. by specifying `absl::Uniform<double>(rng, 0, 1)` to return `1.0`.
       - `Call(tag, rng, 0, 1) -> 42` (i.e. return an arbitrary value). These may be straightforward to fix by just returning an in-range value, or sometimes they are difficult to fix because other data structures depend on those values.
      
      PiperOrigin-RevId: 635503223
      Change-Id: I9293ab78e79450e2b7b682dcb05149f238ecc550
      Justin Bassett committed
  2. 16 May, 2024 1 commit
    • Support `AbslStringify` with `DCHECK_EQ`. · 93ac3a4f
      `AbslStringify` is the [recommended](abseil.io/tips/215) way to make a type printable. However, the simple expression `DCHECK_EQ(x, y)` fails when either argument implements it, and not `operator<<`.
      
      PiperOrigin-RevId: 634261367
      Change-Id: Ic42666c286cf172c9482abbd28194da828706c71
      Abseil Team committed
  3. 15 May, 2024 2 commits
  4. 14 May, 2024 2 commits
  5. 13 May, 2024 3 commits
  6. 10 May, 2024 1 commit
  7. 09 May, 2024 1 commit
  8. 08 May, 2024 3 commits
  9. 07 May, 2024 1 commit
  10. 06 May, 2024 3 commits
  11. 03 May, 2024 2 commits
  12. 02 May, 2024 3 commits
  13. 30 Apr, 2024 1 commit
  14. 26 Apr, 2024 1 commit
  15. 25 Apr, 2024 2 commits
  16. 24 Apr, 2024 5 commits
  17. 19 Apr, 2024 1 commit
  18. 18 Apr, 2024 6 commits