-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate repeated field cleared elements API.
This will be removed in a future release. PiperOrigin-RevId: 503218340
- Loading branch information
1 parent
514c9a8
commit 84d8b00
Showing
1 changed file
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1152,13 +1152,15 @@ class RepeatedPtrField final : private internal::RepeatedPtrFieldBase { | |
// | ||
// This method cannot be called when either the repeated field or |value| is | ||
// on an arena; both cases will trigger a GOOGLE_ABSL_DCHECK-failure. | ||
ABSL_DEPRECATED("This will be removed in a future release") | ||
void AddCleared(Element* value); | ||
// Removes and returns a single element from the cleared pool, passing | ||
// ownership to the caller. The element is guaranteed to be cleared. | ||
// Requires: ClearedCount() > 0 | ||
// | ||
// This method cannot be called when the repeated field is on an arena; doing | ||
// so will trigger a GOOGLE_ABSL_DCHECK-failure. | ||
ABSL_DEPRECATED("This will be removed in a future release") | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mumbleskates
Contributor
|
||
PROTOBUF_NODISCARD Element* ReleaseCleared(); | ||
#endif // !PROTOBUF_FUTURE_REMOVE_CLEARED_API | ||
|
||
|
this fails to build in clang-16:
error: 'nodiscard' attribute cannot be applied to types
PROTOBUF_NODISCARD
seemingly needs to come before the deprecation attribute.