mirror of https://github.com/grpc/grpc.git
[Clean-up] Fix deprecated protobuf function usages (#36640)
Resolved the use of deprecated protobuf functions that would have caused clang-tidy issues with the upcoming protobuf release. The error encountered was:
```
2024-05-15 16:47:15,874 9074 warnings generated.
test/cpp/end2end/message_allocator_end2end_test.cc:330:38: error: 'CreateMessage' is deprecated: Use Create [clang-diagnostic-deprecated-declarations,-warnings-as-errors]
330 | google::protobuf::Arena::CreateMessage(&arena_));
| ^
bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/protobuf_lite/google/protobuf/arena.h:179:3: note: 'CreateMessage' has been explicitly marked deprecated here
179 | ABSL_DEPRECATED("Use Create")
| ^
external/com_google_absl/absl/base/attributes.h:683:49: note: expanded from macro 'ABSL_DEPRECATED'
683 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
| ^
test/cpp/end2end/message_allocator_end2end_test.cc:332:38: error: 'CreateMessage' is deprecated: Use Create [clang-diagnostic-deprecated-declarations,-warnings-as-errors]
332 | google::protobuf::Arena::CreateMessage(&arena_));
| ^
bazel-out/k8-fastbuild/bin/external/com_google_protobuf/src/google/protobuf/_virtual_includes/protobuf_lite/google/protobuf/arena.h:179:3: note: 'CreateMessage' has been explicitly marked deprecated here
179 | ABSL_DEPRECATED("Use Create")
| ^
external/com_google_absl/absl/base/attributes.h:683:49: note: expanded from macro 'ABSL_DEPRECATED'
683 | #define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
|
```
Closes #36640
COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36640 from veblush:protobuf-arena-create 522591a6ee
PiperOrigin-RevId: 635912826
pull/36597/head^2
parent
dc14f9cadb
commit
f4ac0a3093
1 changed files with 2 additions and 4 deletions
Loading…
Reference in new issue