From 0d77c824e7015190a9174052fc5290c23f2b85d0 Mon Sep 17 00:00:00 2001 From: Chris Conroy Date: Fri, 25 Oct 2013 16:43:29 -0400 Subject: Sanitize Enum names from collisions with reserved words. --- src/google/protobuf/compiler/cpp/cpp_helpers.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/google/protobuf/compiler/cpp/cpp_helpers.h') 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); -- cgit v1.2.3