Skip to content

Commit 0fc456a

Browse files
nicocopybara-github
authored andcommitted
Explicitly ignore another unused result of make_unique<>
Recent versions of libc++ mark make_unique<>'s result as [[nodiscard]]: llvm/llvm-project#168483 This place intentionally returns make_unique<>'s result, so explicitly annotate it as such. Previously: https://chromium-review.googlesource.com/c/chromium/src/+/7199487 This instance here is android-only, which is why it wasn't part of that CL. No behavior change. Bug: none Change-Id: I3293f65934d34cfd63795a6b34008aa4a8d78237 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7207549 Reviewed-by: Hans Wennborg <[email protected]> Commit-Queue: Hans Wennborg <[email protected]> Auto-Submit: Nico Weber <[email protected]> Cr-Commit-Position: refs/heads/main@{#1550606} NOKEYCHECK=True GitOrigin-RevId: 1383ff0a2548cf347e245d797e1144885da2231f
1 parent c87719f commit 0fc456a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug/allocation_trace_unittest.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ TEST_F(AllocationTraceRecorderTest, VerifyWithHooks) {
332332
dispatcher.InitializeForTesting(&subject_under_test);
333333

334334
// Perform an allocation and free.
335-
std::make_unique<std::string>(
335+
std::ignore = std::make_unique<std::string>(
336336
"Just enforce an allocation and free to trigger notification of the "
337337
"subject under test. Hopefully this string is long enough to bypass any "
338338
"small string optimizations that the STL implementation might use.");

0 commit comments

Comments
 (0)