Skip to content

Commit b59913e

Browse files
Abseil Teamcopybara-github
authored andcommitted
Add ABSL_ATTRIBUTE_LIFETIME_BOUND to Cord::Flatten/TryFlat
These were already on the declarations, but it seems like the definitions need them as well. PiperOrigin-RevId: 621868985 Change-Id: I2595aae506924f8b1dad3b07efe1660ae0e4488e
1 parent 377de9d commit b59913e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

absl/strings/cord.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,8 @@ inline size_t Cord::EstimatedMemoryUsage(
13541354
return result;
13551355
}
13561356

1357-
inline absl::optional<absl::string_view> Cord::TryFlat() const {
1357+
inline absl::optional<absl::string_view> Cord::TryFlat() const
1358+
ABSL_ATTRIBUTE_LIFETIME_BOUND {
13581359
absl::cord_internal::CordRep* rep = contents_.tree();
13591360
if (rep == nullptr) {
13601361
return absl::string_view(contents_.data(), contents_.size());
@@ -1366,7 +1367,7 @@ inline absl::optional<absl::string_view> Cord::TryFlat() const {
13661367
return absl::nullopt;
13671368
}
13681369

1369-
inline absl::string_view Cord::Flatten() {
1370+
inline absl::string_view Cord::Flatten() ABSL_ATTRIBUTE_LIFETIME_BOUND {
13701371
absl::cord_internal::CordRep* rep = contents_.tree();
13711372
if (rep == nullptr) {
13721373
return absl::string_view(contents_.data(), contents_.size());

0 commit comments

Comments
 (0)