diff options
author | Chris Conroy <cconroy@squareup.com> | 2013-10-25 16:43:29 -0400 |
---|---|---|
committer | Chris Conroy <cconroy@squareup.com> | 2015-03-16 18:42:26 -0400 |
commit | 0d77c824e7015190a9174052fc5290c23f2b85d0 (patch) | |
tree | 2a20e7258f86b13b710a2916e61682ff4944c19c /src/google/protobuf/compiler/cpp/cpp_helpers.h | |
parent | e4a9ace5415477feaefd70a2af2d0e93e83213a3 (diff) |
Sanitize Enum names from collisions with reserved words.
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_helpers.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h index c7bb8f98..284fa2c1 100644 --- a/src/google/protobuf/compiler/cpp/cpp_helpers.h +++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h @@ -74,6 +74,9 @@ string SuperClassName(const Descriptor* descriptor); // anyway, so normally this just returns field->name(). string FieldName(const FieldDescriptor* field); +// Get the sanitized name that should be used for the given enum in C++ code. +string EnumValueName(const EnumValueDescriptor* enum_value); + // Get the unqualified name that should be used for a field's field // number constant. string FieldConstantName(const FieldDescriptor *field); |