1. 03 May, 2024 2 commits
  2. 02 May, 2024 3 commits
  3. 30 Apr, 2024 1 commit
  4. 26 Apr, 2024 1 commit
  5. 25 Apr, 2024 2 commits
  6. 24 Apr, 2024 5 commits
  7. 19 Apr, 2024 1 commit
  8. 18 Apr, 2024 7 commits
  9. 17 Apr, 2024 1 commit
  10. 15 Apr, 2024 1 commit
    • `log/internal/check_op`: Add ABSL_ATTRIBUTE_UNUSED to CHECK macros when STRIP_LOG is enabled · e304ff50
      When `STRIP_LOG` is off, the internal variable `absl_log_internal_check_op_result` is passed to `absl::log_internal::LogMessageFatal()` and used in the failure message.
      When `STRIP_LOG` is on, the variable is truly unused.
      
      Applying a `ABSL_ATTRIBUTE_UNUSED` on the variable triggers `-Wused-but-marked-unused` when `STRIP_LOG` is off, not applying the attribute triggers `-Wunused-but-set-variable` when `STRIP_LOG` is on.
      
      Define a new internal macro `ABSL_LOG_INTERNAL_ATTRIBUTE_UNUSED_IF_STRIP_LOG` that evaluates to `ABSL_ATTRIBUTE_UNUSED` when `STRIP_LOG` is on and nothing when `STRIP_LOG` is off to address both of these scenarios.
      
      PiperOrigin-RevId: 625049155
      Change-Id: Ia3f8a6ca916dd67a287bbda4b9bd6c574c92247a
      Dino Radakovic committed
  11. 12 Apr, 2024 1 commit
  12. 09 Apr, 2024 2 commits
  13. 05 Apr, 2024 1 commit
  14. 04 Apr, 2024 4 commits
  15. 03 Apr, 2024 1 commit
  16. 02 Apr, 2024 6 commits
  17. 01 Apr, 2024 1 commit
    • Add internal traits for lifetimebound detection · 8a31d4a8
      This will helps compilers that understand `ABSL_ATTRIBUTE_LIFETIME_BOUND` flag constructs such as
      `absl::StatusOr<std::string_view> str = std::string(...)`
      as error-prone.
      
      For standard types, this is done via specializing the type traits.
      For all other types, this is done by detecting the presence of a Boolean member trait such as:
      `using absl_internal_is_view = std::true_type;`
      in the type.
      
      This is purely intended as a safety feature, and the values of these traits (even if wrong!) must NOT be depended on for correct behavior.
      Furthermore, only high-value types (such as `absl::StatusOr`) are the intended users here.
      Do not declare or use these traits on arbitrary types that are unlikely to be misused.
      
      Do not depend on any of these to be stable, as they not (yet) public APIs.
      Moreover, the trait declarations and mechanisms are all subject to change.
      (For example, if `[[clang::lifetimebound]]` becomes possible to detect directly, the traits may need to be altered to utilize that, and distinguish between assignments and constructions.)
      
      Should these or similar APIs be made public at a later point, the detection mechanisms may be altered quickly, and may (either loudly or silently) break existing code depending on these internal APIs without notice.
      
      PiperOrigin-RevId: 620868493
      Change-Id: I4a528a1dcf0df6ffbc3641d09537bc4c674aee4e
      Abseil Team committed