diff options
author | Jisi Liu <jisi.liu@gmail.com> | 2017-10-18 12:22:18 -0700 |
---|---|---|
committer | Jisi Liu <jisi.liu@gmail.com> | 2017-10-18 12:22:18 -0700 |
commit | 1a7a7fca804afa1cf67f8be5e71092898ba40334 (patch) | |
tree | 04b3da27c71c607510f34a12cf7856a1b94181ae /src/google/protobuf/compiler/cpp/cpp_helpers.h | |
parent | c4f59dcc5c13debc572154c8f636b8a9361aacde (diff) |
Merge from google internal
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_helpers.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.h b/src/google/protobuf/compiler/cpp/cpp_helpers.h index 550438dd..e0f809c9 100644 --- a/src/google/protobuf/compiler/cpp/cpp_helpers.h +++ b/src/google/protobuf/compiler/cpp/cpp_helpers.h @@ -305,6 +305,11 @@ inline bool SupportsArenas(const FieldDescriptor* field) { return SupportsArenas(field->file()); } +inline bool IsCrossFileMessage(const FieldDescriptor* field) { + return field->type() == FieldDescriptor::TYPE_MESSAGE && + field->message_type()->file() != field->file(); +} + bool IsAnyMessage(const FileDescriptor* descriptor); bool IsAnyMessage(const Descriptor* descriptor); |