Skip to content

Commit 53d827e

Browse files
committed
Remove test for very low-value feature blocking PyCLIF-pybind11 work.
Using `unique_ptr` to pass an enum type is a very artificial construct. Supporting this feature in PyCLIF-pybind11 is possible, but not worth the effort, including the effort for maintaining the added complexity. It seems very unlikely that this feature is used in client code, and if it is, it will be best to change the client code to pass the enum directly (less generated machine code, more performant). Tested: ``` tap_presubmit -p clif.pybind11 --detach --email -c 495090196 ``` * http://tap/OCL:495090196:BASE:495090752:1670962252251:52d68751 PiperOrigin-RevId: 495125268
1 parent 47a082b commit 53d827e

File tree

3 files changed

+0
-5
lines changed

3 files changed

+0
-5
lines changed

clif/testing/python/t4.clif

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ from "clif/testing/t4.h":
1818
def `walk_ast` as Walk(pb: AST) -> int
1919
def `size_ast` as Size(pb: AST) -> int
2020
def `decl_type` as DeclType(pb: Decl) -> Decl.Type
21-
def `decl_type_uniq_out` as DeclTypeUO(pb: Decl) -> Decl.Type
2221
def `decl_type_uniq_in` as DeclTypeUI(pb: Decl) -> Decl.Type
2322
def all_ast_borrowed() -> list<AST>
2423
def all_ast_holds() -> list<AST>

clif/testing/python/t4_test.py

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def testProtoNestedParam(self):
3434
pb.decltype = pb.FUNC
3535
self.assertEqual(t4.DeclType(pb), pb.FUNC)
3636
self.assertEqual(t4.DeclTypeUI(pb), pb.FUNC)
37-
self.assertEqual(t4.DeclTypeUO(pb), pb.FUNC)
3837

3938
def testProtoNestedMessage(self):
4039
pb = nested_pb2.Outer.Inner()

clif/testing/t4.h

-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ inline Decl::Type decl_type(const Decl& pb) { return pb.decltype_(); }
3838
inline Decl::Type decl_type_uniq_in(std::unique_ptr<Decl> t) {
3939
return t->decltype_();
4040
}
41-
inline std::unique_ptr<Decl::Type> decl_type_uniq_out(const Decl& pb) {
42-
return std::make_unique<Decl::Type>(pb.decltype_());
43-
}
4441

4542
inline long size_any_ref(const ::proto2::Message& pb) { // NOLINT
4643
return pb.ByteSizeLong();

0 commit comments

Comments
 (0)