krasimir created this revision. Herald added a subscriber: klimek. This patch adds LLVM_NODISCARD to Replacements::merge. I've hit this several times already.
https://reviews.llvm.org/D36149 Files: include/clang/Tooling/Core/Replacement.h Index: include/clang/Tooling/Core/Replacement.h =================================================================== --- include/clang/Tooling/Core/Replacement.h +++ include/clang/Tooling/Core/Replacement.h @@ -255,7 +255,7 @@ /// \brief Merges \p Replaces into the current replacements. \p Replaces /// refers to code after applying the current replacements. - Replacements merge(const Replacements &Replaces) const; + LLVM_NODISCARD Replacements merge(const Replacements &Replaces) const; // Returns the affected ranges in the changed code. std::vector<Range> getAffectedRanges() const;
Index: include/clang/Tooling/Core/Replacement.h =================================================================== --- include/clang/Tooling/Core/Replacement.h +++ include/clang/Tooling/Core/Replacement.h @@ -255,7 +255,7 @@ /// \brief Merges \p Replaces into the current replacements. \p Replaces /// refers to code after applying the current replacements. - Replacements merge(const Replacements &Replaces) const; + LLVM_NODISCARD Replacements merge(const Replacements &Replaces) const; // Returns the affected ranges in the changed code. std::vector<Range> getAffectedRanges() const;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits