aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2018-09-19 12:58:02 -0700
committerGravatar GitHub <noreply@github.com>2018-09-19 12:58:02 -0700
commitf6e7b778c42da01610f914271ccddee49becb2fa (patch)
treef38bcb94592cf752085c9a4200e19e0636a45dba
parenta0578f075ccd64a7041c02c0efcf3bb590aa019e (diff)
parentdeb3126611a513b768052d93a976832985640d9f (diff)
Merge pull request #16655 from vjpai/callback_tidy
Callback API: Fix clang-tidy concerns
-rw-r--r--src/cpp/common/callback_common.cc4
-rw-r--r--test/cpp/end2end/client_callback_end2end_test.cc2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/cpp/common/callback_common.cc b/src/cpp/common/callback_common.cc
index fa586286d1..a0c8eeb516 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 3b492090dd..d8cb44b694 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<std::mutex> l(mu);