Merge pull request #24842 from veblush/tidy-google-build-using-namespace

[Clang-Tidy] google-build-using-namespace
pull/24858/head
Esun Kim 4 years ago committed by GitHub
commit 8ee0e6c6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .clang-tidy
  2. 7
      src/core/ext/filters/client_channel/http_connect_handshaker.cc
  3. 4
      src/core/lib/channel/handshaker.cc
  4. 7
      test/core/handshake/readahead_handshaker_server_ssl.cc

@ -10,7 +10,6 @@ Checks: '-*,
-performance-unnecessary-copy-initialization, -performance-unnecessary-copy-initialization,
-performance-unnecessary-value-param, -performance-unnecessary-value-param,
google-*, google-*,
-google-build-using-namespace,
-google-explicit-constructor, -google-explicit-constructor,
-google-readability-casting, -google-readability-casting,
-google-runtime-int, -google-runtime-int,

@ -382,8 +382,7 @@ class HttpConnectHandshakerFactory : public HandshakerFactory {
} // namespace grpc_core } // namespace grpc_core
void grpc_http_connect_register_handshaker_factory() { void grpc_http_connect_register_handshaker_factory() {
using namespace grpc_core; grpc_core::HandshakerRegistry::RegisterHandshakerFactory(
HandshakerRegistry::RegisterHandshakerFactory( true /* at_start */, grpc_core::HANDSHAKER_CLIENT,
true /* at_start */, HANDSHAKER_CLIENT, absl::make_unique<grpc_core::HttpConnectHandshakerFactory>());
absl::make_unique<HttpConnectHandshakerFactory>());
} }

@ -256,7 +256,7 @@ void HandshakeManager::DoHandshake(grpc_endpoint* endpoint,
void grpc_handshake_manager_add(grpc_handshake_manager* mgr, void grpc_handshake_manager_add(grpc_handshake_manager* mgr,
grpc_handshaker* handshaker) { grpc_handshaker* handshaker) {
// This is a transition method to aid the API change for handshakers. // This is a transition method to aid the API change for handshakers.
using namespace grpc_core; grpc_core::RefCountedPtr<grpc_core::Handshaker> refd_hs(
RefCountedPtr<Handshaker> refd_hs(static_cast<Handshaker*>(handshaker)); static_cast<grpc_core::Handshaker*>(handshaker));
mgr->Add(refd_hs); mgr->Add(refd_hs);
} }

@ -77,11 +77,10 @@ class ReadAheadHandshakerFactory : public HandshakerFactory {
} // namespace grpc_core } // namespace grpc_core
int main(int /*argc*/, char* /*argv*/[]) { int main(int /*argc*/, char* /*argv*/[]) {
using namespace grpc_core;
grpc_init(); grpc_init();
HandshakerRegistry::RegisterHandshakerFactory( grpc_core::HandshakerRegistry::RegisterHandshakerFactory(
true /* at_start */, HANDSHAKER_SERVER, true /* at_start */, grpc_core::HANDSHAKER_SERVER,
absl::make_unique<ReadAheadHandshakerFactory>()); absl::make_unique<grpc_core::ReadAheadHandshakerFactory>());
const char* full_alpn_list[] = {"grpc-exp", "h2"}; const char* full_alpn_list[] = {"grpc-exp", "h2"};
GPR_ASSERT(server_ssl_test(full_alpn_list, 2, "grpc-exp")); GPR_ASSERT(server_ssl_test(full_alpn_list, 2, "grpc-exp"));
grpc_shutdown(); grpc_shutdown();

Loading…
Cancel
Save