Skip to content

Commit dfdaab9

Browse files
RKSimonkbluck
authored andcommitted
Fix MSVC discarded return value warnings. NFC.
"C4858 This function constructs an object wrapped by a smart pointer and has no other effects; it is not useful to call this function and discard the return value."
1 parent 69c2d0a commit dfdaab9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/unittests/Analysis/MLModelRunnerTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ TEST(ReleaseModelRunner, ModelSelectorNoInputFeaturePresent) {
198198
LLVMContext Ctx;
199199
std::vector<TensorSpec> Inputs{TensorSpec::createSpec<int64_t>("a", {1}),
200200
TensorSpec::createSpec<int64_t>("b", {1})};
201-
EXPECT_DEATH(std::make_unique<ReleaseModeModelRunner<AdditionAOTModel>>(
201+
EXPECT_DEATH((void)std::make_unique<ReleaseModeModelRunner<AdditionAOTModel>>(
202202
Ctx, Inputs, "", makeOptions().setModelSelector(M2Selector)),
203203
"A model selector was specified but the underlying model does "
204204
"not expose a model_selector input");
@@ -209,7 +209,7 @@ TEST(ReleaseModelRunner, ModelSelectorNoSelectorGiven) {
209209
std::vector<TensorSpec> Inputs{TensorSpec::createSpec<int64_t>("a", {1}),
210210
TensorSpec::createSpec<int64_t>("b", {1})};
211211
EXPECT_DEATH(
212-
std::make_unique<ReleaseModeModelRunner<ComposedAOTModel>>(
212+
(void)std::make_unique<ReleaseModeModelRunner<ComposedAOTModel>>(
213213
Ctx, Inputs, "", makeOptions()),
214214
"A model selector was not specified but the underlying model requires "
215215
"selecting one because it exposes a model_selector input");

0 commit comments

Comments
 (0)