diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
index 26d34e1b3f9f857366c7998b73bdff92ce333726..9e9cee3d3a4130d1d63c8a6babe4b367651ab909 100644
--- a/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc
@@ -1750,7 +1750,7 @@ void XdsLb::LocalityMap::PruneLocalities(const LocalityList& locality_list) {
 
 void XdsLb::LocalityMap::UpdateLocked(
     const LocalityList& locality_serverlist,
-    RefCountedPtr<ParsedLoadBalancingConfig> child_policy_config,
+    const RefCountedPtr<ParsedLoadBalancingConfig>& child_policy_config,
     const grpc_channel_args* args, XdsLb* parent) {
   if (parent->shutting_down_) return;
   for (size_t i = 0; i < locality_serverlist.size(); i++) {
@@ -1845,7 +1845,7 @@ XdsLb::LocalityMap::LocalityEntry::CreateChildPolicyLocked(
 
 void XdsLb::LocalityMap::LocalityEntry::UpdateLocked(
     xds_grpclb_serverlist* serverlist,
-    RefCountedPtr<ParsedLoadBalancingConfig> child_policy_config,
+    const RefCountedPtr<ParsedLoadBalancingConfig>& child_policy_config,
     const grpc_channel_args* args_in) {
   if (parent_->shutting_down_) return;
   // Construct update args.
diff --git a/test/core/client_channel/service_config_test.cc b/test/core/client_channel/service_config_test.cc
index fd5304c17d4da6864fcb7960851b2fc06925b2a6..7a41283012e2f418391270909a6616e45566c81e 100644
--- a/test/core/client_channel/service_config_test.cc
+++ b/test/core/client_channel/service_config_test.cc
@@ -137,7 +137,7 @@ class ErrorParser : public ServiceConfig::Parser {
   static const char* GlobalError() { return "ErrorParser : globalError"; }
 };
 
-void VerifyRegexMatch(grpc_error* error, std::regex e) {
+void VerifyRegexMatch(grpc_error* error, const std::regex& e) {
   std::smatch match;
   std::string s(grpc_error_string(error));
   EXPECT_TRUE(std::regex_search(s, match, e));