base/strings: Add more WARN_UNUSED_RESULTs
This adds WARN_UNUSED_RESULT to some methods in //base/strings whose primary purpose is to return something useful (e.g. StrCat). When the results of these methods go unused, it's usually caller error and will be found by the caller later (for instance, when their tests fail). WARN_UNUSED_RESULT makes this fail earlier, at compile time. Precedent: Abseil's StrCat, etc., all use ABSL_MUST_USE_RESULT. Change-Id: I8262b03bd844118c7337861f323417c2bb92ddda Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1925251Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: David Van Cleve <davidvc@chromium.org> Cr-Commit-Position: refs/heads/master@{#717633}
Showing
Please register or sign in to comment