[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
Loading
Please sign in to comment