aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/cpp')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.cc2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.h2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_message.cc9
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_message_field.cc2
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_unittest.h6
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_unittest.inc2
6 files changed, 12 insertions, 11 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
index e565a0c5..bc0a9264 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
@@ -1324,7 +1324,7 @@ void GenerateCaseBody(internal::WireFormatLite::WireType wiretype,
format(
"object = "
"CastToBase(&msg->$1$_)->AddWeak(reinterpret_cast<const "
- "::proto2::MessageLite*>(&$2$::_$3$_default_instance_));\n",
+ "::google::protobuf::MessageLite*>(&$2$::_$3$_default_instance_));\n",
FieldName(field), Namespace(field->message_type()),
ClassName(field->message_type()));
}
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h
index 98cd9c57..c01329fa 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.h
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h
@@ -135,7 +135,7 @@ string DefaultInstanceName(const Descriptor* descriptor);
// fields.
string ReferenceFunctionName(const Descriptor* descriptor);
-// Name of the base class: proto2::Message or proto2::MessageLite.
+// Name of the base class: google::protobuf::Message or google::protobuf::MessageLite.
string SuperClassName(const Descriptor* descriptor, const Options& options);
// Get the (unqualified) name that should be used for this field in C++ code.
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc
index 5e9e1a6d..e219d784 100644
--- a/src/google/protobuf/compiler/cpp/cpp_message.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_message.cc
@@ -941,7 +941,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
"public:\n"
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
" static const char* _InternalParse(const char* begin, const char* "
- "end, void* object, ::proto2::internal::ParseContext* ctx);\n"
+ "end, void* object, ::$proto_ns$::internal::ParseContext* ctx);\n"
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
" typedef ::$proto_ns$::internal::MapEntry$lite$<$classname$, \n"
" $key_cpp$, $val_cpp$,\n"
@@ -1158,7 +1158,7 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
"size_t ByteSizeLong() const final;\n"
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
"static const char* _InternalParse(const char* begin, const char* end, "
- "void* object, ::proto2::internal::ParseContext* ctx);\n"
+ "void* object, ::$proto_ns$::internal::ParseContext* ctx);\n"
"::$proto_ns$::internal::ParseFunc _ParseFunc() const final { return "
"_InternalParse; }\n"
"#else\n"
@@ -1170,7 +1170,8 @@ void MessageGenerator::GenerateClassDefinition(io::Printer* printer) {
format(
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
"static const char* InternalParseMessageSetItem(const char* begin, "
- "const char* end, void* object, ::proto2::internal::ParseContext* "
+ "const char* end, void* object, "
+ "::$proto_ns$::internal::ParseContext* "
"ctx);\n"
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n");
}
@@ -1879,7 +1880,7 @@ void MessageGenerator::GenerateClassMethods(io::Printer* printer) {
format(
"#if $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n"
"const char* $classname$::_InternalParse(const char* begin, const "
- "char* end, void* object, ::proto2::internal::ParseContext* ctx) { "
+ "char* end, void* object, ::$proto_ns$::internal::ParseContext* ctx) { "
"return end; }\n"
"#endif // $GOOGLE_PROTOBUF$_ENABLE_EXPERIMENTAL_PARSER\n");
format("\n");
diff --git a/src/google/protobuf/compiler/cpp/cpp_message_field.cc b/src/google/protobuf/compiler/cpp/cpp_message_field.cc
index 0bbf35b2..afb27273 100644
--- a/src/google/protobuf/compiler/cpp/cpp_message_field.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_message_field.cc
@@ -48,7 +48,7 @@ namespace {
// When we are generating code for implicit weak fields, we need to insert some
// additional casts. These functions return the casted expression if
// implicit_weak_field is true but otherwise return the original expression.
-// Ordinarily a static_cast is enough to cast proto2::MessageLite* to a class
+// Ordinarily a static_cast is enough to cast google::protobuf::MessageLite* to a class
// deriving from it, but we need a reinterpret_cast in cases where the generated
// message is forward-declared but its full definition is not visible.
string StaticCast(const string& type, const string& expression,
diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.h b/src/google/protobuf/compiler/cpp/cpp_unittest.h
index d2dcf0a5..c5dc767a 100644
--- a/src/google/protobuf/compiler/cpp/cpp_unittest.h
+++ b/src/google/protobuf/compiler/cpp/cpp_unittest.h
@@ -28,14 +28,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This header declares the namespace proto2::protobuf_unittest in order to expose
+// This header declares the namespace google::protobuf::protobuf_unittest in order to expose
// any problems with the generated class names. We use this header to ensure
// unittest.cc will declare the namespace prior to other includes, while obeying
// normal include ordering.
//
// When generating a class name of "foo.Bar" we must ensure we prefix the class
-// name with "::", in case the namespace proto2::foo exists. We intentionally
-// trigger that case here by declaring proto2::protobuf_unittest.
+// name with "::", in case the namespace google::protobuf::foo exists. We intentionally
+// trigger that case here by declaring google::protobuf::protobuf_unittest.
//
// See ClassName in helpers.h for more details.
diff --git a/src/google/protobuf/compiler/cpp/cpp_unittest.inc b/src/google/protobuf/compiler/cpp/cpp_unittest.inc
index bb37b4ac..0604731f 100644
--- a/src/google/protobuf/compiler/cpp/cpp_unittest.inc
+++ b/src/google/protobuf/compiler/cpp/cpp_unittest.inc
@@ -105,7 +105,7 @@ class MockErrorCollector : public MultiFileErrorCollector {
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
// Test that generated code has proper descriptors:
-// Parse a descriptor directly (using proto2::compiler::Importer) and
+// Parse a descriptor directly (using google::protobuf::compiler::Importer) and
// compare it to the one that was produced by generated code.
TEST(GENERATED_DESCRIPTOR_TEST_NAME, IdenticalDescriptors) {
const FileDescriptor* generated_descriptor =