From deb3126611a513b768052d93a976832985640d9f Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 19 Sep 2018 11:29:11 -0700 Subject: [PATCH] Fix clang-tidy concerns --- src/cpp/common/callback_common.cc | 4 ++-- test/cpp/end2end/client_callback_end2end_test.cc | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cpp/common/callback_common.cc b/src/cpp/common/callback_common.cc index fa586286d1c..a0c8eeb5160 100644 --- a/src/cpp/common/callback_common.cc +++ b/src/cpp/common/callback_common.cc @@ -66,8 +66,8 @@ class CallbackWithSuccessImpl : public grpc_core::CQCallbackInterface { GPR_ASSERT(parent_->ops()->FinalizeResult(&ignored, &new_ok)); GPR_ASSERT(ignored == parent_->ops()); - // Last use of func_ or ok, so ok to move them out for rvalue call above - CatchingCallback(std::move(func_), std::move(ok)); + // Last use of func_, so ok to move it out for rvalue call above + CatchingCallback(std::move(func_), ok); func_ = nullptr; // reset to clear this out for sure grpc_call_unref(call_); diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index 3b492090dd1..d8cb44b694a 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -95,6 +95,8 @@ class ClientCallbackEnd2endTest : public ::testing::Test { if (maybe_except) { throw - 1; } +#else + GPR_ASSERT(!maybe_except); #endif }); std::unique_lock l(mu);