Skip to content
Commit 3260b00d authored by Artem Dergachev's avatar Artem Dergachev
Browse files

[ADT] Annotate immutable list/set/map update methods with LLVM_NODISCARD.

Because immutable data structures are, well, immutable, methods like "append",
"add", "set" create a copy of the list (set, map) instead of mutating the
existing map. If the updated object is discarded, it clearly indicates a bug.
Such bugs are introduced frequently, hence the warn_unused_result annotation.

Differential Revision: https://reviews.llvm.org/D47496

llvm-svn: 333672
parent 22746d7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment