From 57d1e082689c96e2721122748b08583d6b63d394 Mon Sep 17 00:00:00 2001
From: yang-g <yangg@google.com>
Date: Mon, 25 Apr 2016 15:31:39 -0700
Subject: [PATCH] resolve comments

---
 src/compiler/cpp_plugin.cc       | 20 +++++++++++++-------
 src/compiler/generator_helpers.h |  2 +-
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc
index f1a1d80939..a4c6f011c7 100644
--- a/src/compiler/cpp_plugin.cc
+++ b/src/compiler/cpp_plugin.cc
@@ -43,7 +43,7 @@
 #include "src/compiler/cpp_generator_helpers.h"
 #include "src/compiler/generator_helpers.h"
 
-using grpc_generator::GetComments;
+using grpc_generator::GetCppComments;
 
 class ProtoBufMethod : public grpc_cpp_generator::Method {
  public:
@@ -75,10 +75,12 @@ class ProtoBufMethod : public grpc_cpp_generator::Method {
     return method_->client_streaming() && method_->server_streaming();
   }
 
-  grpc::string GetLeadingComments() const { return GetComments(method_, true); }
+  grpc::string GetLeadingComments() const {
+    return GetCppComments(method_, true);
+  }
 
   grpc::string GetTrailingComments() const {
-    return GetComments(method_, false);
+    return GetCppComments(method_, false);
   }
 
  private:
@@ -99,11 +101,11 @@ class ProtoBufService : public grpc_cpp_generator::Service {
   };
 
   grpc::string GetLeadingComments() const {
-    return GetComments(service_, true);
+    return GetCppComments(service_, true);
   }
 
   grpc::string GetTrailingComments() const {
-    return GetComments(service_, false);
+    return GetCppComments(service_, false);
   }
 
  private:
@@ -154,9 +156,13 @@ class ProtoBufFile : public grpc_cpp_generator::File {
           new ProtoBufPrinter(str));
   }
 
-  grpc::string GetLeadingComments() const { return GetComments(file_, true); }
+  grpc::string GetLeadingComments() const {
+    return GetCppComments(file_, true);
+  }
 
-  grpc::string GetTrailingComments() const { return GetComments(file_, false); }
+  grpc::string GetTrailingComments() const {
+    return GetCppComments(file_, false);
+  }
 
  private:
   const grpc::protobuf::FileDescriptor *file_;
diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h
index 4e32e76a05..93bf3b85d3 100644
--- a/src/compiler/generator_helpers.h
+++ b/src/compiler/generator_helpers.h
@@ -258,7 +258,7 @@ inline grpc::string GenerateCommentsWithPrefix(
 // Get leading or trailing comments in a string. Comment lines start with "// ".
 // Leading detached comments are put in in front of leading comments.
 template <typename DescriptorType>
-inline grpc::string GetComments(const DescriptorType *desc, bool leading) {
+inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) {
   std::vector<grpc::string> out;
   if (leading) {
     grpc_generator::GetComment(
-- 
GitLab