Skip to content

Conversation

@copybara-service
Copy link

Apply [[nodiscard]] to constant, non-message accessors.

Ignoring the return value likely indicates an omission on the part of the
caller or a call that can be cleaned up. This can be particularly prevailent
with confusingly named fields like "enable_foobar", the getter is imperative
even though const, or "clear_foobar" which is confused with the actual clear
method for the field.

Ignoring the return value likely indicates an omission on the part of the
caller or a call that can be cleaned up.  This can be particularly prevailent
with confusingly named fields like "enable_foobar", the getter is imperative
even though const, or "clear_foobar" which is confused with the actual clear
method for the field.

PiperOrigin-RevId: 789367038
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant