llvm-project
230946fa - [ADT] Mark reverse and concat as nodiscard (#115611)

Commit
1 year ago
[ADT] Mark reverse and concat as nodiscard (#115611) It may not be immediately obvious if these two functions modify the given ranges or return a view over them. We have seen downstream code that mistakenly assumed the given range would be mutated. Add the `[[nodiscard]]` attribute to prevent these errors. Also clarify the lack of mutation in the documentation comments.
Author
Parents
Loading