diff --git a/pybind11_protobuf/enum_type_caster.h b/pybind11_protobuf/enum_type_caster.h index 5765233..d30369b 100644 --- a/pybind11_protobuf/enum_type_caster.h +++ b/pybind11_protobuf/enum_type_caster.h @@ -1,3 +1,8 @@ +// IWYU pragma: always_keep // Appears to be the best we can do at the moment. +// What we really want (but does not work with Include Cleaner @ 2023-10-27): +// * If native_proto_caster.h is included: suggest removing enum_type_caster.h +// * If only enum_type_caster.h is included: always_keep + #ifndef PYBIND11_PROTOBUF_ENUM_TYPE_CASTER_H_ #define PYBIND11_PROTOBUF_ENUM_TYPE_CASTER_H_ diff --git a/pybind11_protobuf/native_proto_caster.h b/pybind11_protobuf/native_proto_caster.h index bc4ca54..32afb50 100644 --- a/pybind11_protobuf/native_proto_caster.h +++ b/pybind11_protobuf/native_proto_caster.h @@ -1,3 +1,5 @@ +// IWYU pragma: always_keep // See pybind11/docs/type_caster_iwyu.rst + #ifndef PYBIND11_PROTOBUF_NATIVE_PROTO_CASTERS_H_ #define PYBIND11_PROTOBUF_NATIVE_PROTO_CASTERS_H_ diff --git a/pybind11_protobuf/proto_cast_util.h b/pybind11_protobuf/proto_cast_util.h index 75c136c..4821e94 100644 --- a/pybind11_protobuf/proto_cast_util.h +++ b/pybind11_protobuf/proto_cast_util.h @@ -1,3 +1,5 @@ +// IWYU pragma: private, include "pybind11_protobuf/native_proto_caster.h" + #ifndef PYBIND11_PROTOBUF_PROTO_CAST_UTIL_H_ #define PYBIND11_PROTOBUF_PROTO_CAST_UTIL_H_ diff --git a/pybind11_protobuf/proto_caster_impl.h b/pybind11_protobuf/proto_caster_impl.h index 3508ee6..f54b175 100644 --- a/pybind11_protobuf/proto_caster_impl.h +++ b/pybind11_protobuf/proto_caster_impl.h @@ -1,3 +1,5 @@ +// IWYU pragma: private, include "pybind11_protobuf/native_proto_caster.h" + #ifndef PYBIND11_PROTOBUF_PROTO_CASTER_IMPL_H_ #define PYBIND11_PROTOBUF_PROTO_CASTER_IMPL_H_ diff --git a/pybind11_protobuf/wrapped_proto_caster.h b/pybind11_protobuf/wrapped_proto_caster.h index d45282f..18cf7da 100644 --- a/pybind11_protobuf/wrapped_proto_caster.h +++ b/pybind11_protobuf/wrapped_proto_caster.h @@ -1,3 +1,5 @@ +// IWYU pragma: always_keep // See pybind11/docs/type_caster_iwyu.rst + #ifndef PYBIND11_PROTOBUF_WRAPPED_PROTO_CASTER_H_ #define PYBIND11_PROTOBUF_WRAPPED_PROTO_CASTER_H_