Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Don't return value types as const #24103

Merged
merged 1 commit into from
Apr 19, 2019
Merged

Conversation

omajid
Copy link
Member

@omajid omajid commented Apr 18, 2019

These types are value types; they are returned by copying. Marking the
return type as const has no effect: since the value is copied, the
caller can modify it anyway.

This resolves all the -Wignored-qualifiers warnings produced by clang 7
(when those warnings are explicitly enabled).

These types are value types; they are returned by copying. Marking the
return type as const has no effect: since the value is copied, the
caller can modify it anyway.

This resolves all the -Wignored-qualifiers warnings produced by clang 7
(when those warnings are explicitly enabled).
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit e4e261f into dotnet:master Apr 19, 2019
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
These types are value types; they are returned by copying. Marking the
return type as const has no effect: since the value is copied, the
caller can modify it anyway.

This resolves all the -Wignored-qualifiers warnings produced by clang 7
(when those warnings are explicitly enabled).

Commit migrated from dotnet/coreclr@e4e261f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants