Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
index e76f8e99154b6c015dd265805874f4b17ba3f83a..02d60b3e97ac8f82f6ee17e2cc3d1836719a7390 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
@@ -62,7 +62,7 @@ void EnumGenerator::GenerateHeader(io::Printer* printer) {
string enum_comments;
SourceLocation location;
if (descriptor_->GetSourceLocation(&location)) {
- enum_comments = BuildCommentsString(location);
+ enum_comments = BuildCommentsString(location, true);
} else {
enum_comments = "";
}
@@ -74,23 +74,25 @@ void EnumGenerator::GenerateHeader(io::Printer* printer) {
printer->Print("$comments$typedef$deprecated_attribute$ GPB_ENUM($name$) {\n",
"comments", enum_comments,
- "deprecated_attribute", GetOptionalDeprecatedAttribute(descriptor_),
+ "deprecated_attribute", GetOptionalDeprecatedAttribute(descriptor_, descriptor_->file()),
"name", name_);
printer->Indent();
if (HasPreservingUnknownEnumSemantics(descriptor_->file())) {
// Include the unknown value.
printer->Print(
- "/// Value used if any message's field encounters a value that is not defined\n"
- "/// by this enum. The message will also have C functions to get/set the rawValue\n"
- "/// of the field.\n"
+ "/**\n"
+ " * Value used if any message's field encounters a value that is not defined\n"
+ " * by this enum. The message will also have C functions to get/set the rawValue\n"
+ " * of the field.\n"
+ " **/\n"
"$name$_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,\n",
"name", name_);
}
for (int i = 0; i < all_values_.size(); i++) {
SourceLocation location;
if (all_values_[i]->GetSourceLocation(&location)) {
- string comments = BuildCommentsString(location).c_str();
+ string comments = BuildCommentsString(location, true).c_str();
if (comments.length() > 0) {
if (i > 0) {
printer->Print("\n");
@@ -111,8 +113,10 @@ void EnumGenerator::GenerateHeader(io::Printer* printer) {
"\n"
"GPBEnumDescriptor *$name$_EnumDescriptor(void);\n"
"\n"
- "/// Checks to see if the given value is defined by the enum or was not known at\n"
- "/// the time this source was generated.\n"
+ "/**\n"
+ " * Checks to see if the given value is defined by the enum or was not known at\n"
+ " * the time this source was generated.\n"
+ " **/\n"
"BOOL $name$_IsValidValue(int32_t value);\n"
"\n",
"name", name_);

Powered by Google App Engine
This is Rietveld 408576698