Merge pull request #2228 from ctiller/create-pull-request/patch-aeaca27

Automated fix for refs/heads/step-by-step
pull/36985/head
Craig Tiller 8 months ago committed by GitHub
commit 07b14c9d91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 46
      src/core/lib/transport/call_filters.h
  2. 2
      src/core/lib/transport/interception_chain.h

@ -370,7 +370,7 @@ struct AddOpImpl<FilterType, T, const NoInterceptor*, which> {
// void $INTERCEPTOR_NAME($VALUE_TYPE&) // void $INTERCEPTOR_NAME($VALUE_TYPE&)
template <typename FilterType, typename T, template <typename FilterType, typename T,
void (FilterType::Call::* impl)(typename T::element_type&)> void (FilterType::Call::*impl)(typename T::element_type&)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
void (FilterType::Call::*)(typename T::element_type&), impl> { void (FilterType::Call::*)(typename T::element_type&), impl> {
static void Add(FilterType* channel_data, size_t call_offset, Layout<T>& to) { static void Add(FilterType* channel_data, size_t call_offset, Layout<T>& to) {
@ -391,8 +391,8 @@ struct AddOpImpl<FilterType, T,
// void $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*) // void $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*)
template <typename FilterType, typename T, template <typename FilterType, typename T,
void (FilterType::Call::* impl)(typename T::element_type&, void (FilterType::Call::*impl)(typename T::element_type&,
FilterType*)> FilterType*)>
struct AddOpImpl< struct AddOpImpl<
FilterType, T, FilterType, T,
void (FilterType::Call::*)(typename T::element_type&, FilterType*), impl> { void (FilterType::Call::*)(typename T::element_type&, FilterType*), impl> {
@ -415,7 +415,7 @@ struct AddOpImpl<
// $VALUE_HANDLE $INTERCEPTOR_NAME($VALUE_HANDLE, FilterType*) // $VALUE_HANDLE $INTERCEPTOR_NAME($VALUE_HANDLE, FilterType*)
template <typename FilterType, typename T, template <typename FilterType, typename T,
T (FilterType::Call::* impl)(T, FilterType*)> T (FilterType::Call::*impl)(T, FilterType*)>
struct AddOpImpl<FilterType, T, T (FilterType::Call::*)(T, FilterType*), impl> { struct AddOpImpl<FilterType, T, T (FilterType::Call::*)(T, FilterType*), impl> {
static void Add(FilterType* channel_data, size_t call_offset, Layout<T>& to) { static void Add(FilterType* channel_data, size_t call_offset, Layout<T>& to) {
to.Add( to.Add(
@ -438,7 +438,7 @@ struct AddOpImpl<FilterType, T, T (FilterType::Call::*)(T, FilterType*), impl> {
// absl::Status $INTERCEPTOR_NAME($VALUE_TYPE&) // absl::Status $INTERCEPTOR_NAME($VALUE_TYPE&)
template <typename FilterType, typename T, template <typename FilterType, typename T,
absl::Status (FilterType::Call::* impl)(typename T::element_type&)> absl::Status (FilterType::Call::*impl)(typename T::element_type&)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
absl::Status (FilterType::Call::*)(typename T::element_type&), absl::Status (FilterType::Call::*)(typename T::element_type&),
impl> { impl> {
@ -464,7 +464,7 @@ struct AddOpImpl<FilterType, T,
// absl::Status $INTERCEPTOR_NAME(const $VALUE_TYPE&) // absl::Status $INTERCEPTOR_NAME(const $VALUE_TYPE&)
template <typename FilterType, typename T, template <typename FilterType, typename T,
absl::Status (FilterType::Call::* impl)( absl::Status (FilterType::Call::*impl)(
const typename T::element_type&)> const typename T::element_type&)>
struct AddOpImpl< struct AddOpImpl<
FilterType, T, FilterType, T,
@ -491,8 +491,8 @@ struct AddOpImpl<
// absl::Status $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*) // absl::Status $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*)
template <typename FilterType, typename T, template <typename FilterType, typename T,
absl::Status (FilterType::Call::* impl)(typename T::element_type&, absl::Status (FilterType::Call::*impl)(typename T::element_type&,
FilterType*)> FilterType*)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
absl::Status (FilterType::Call::*)(typename T::element_type&, absl::Status (FilterType::Call::*)(typename T::element_type&,
FilterType*), FilterType*),
@ -520,7 +520,7 @@ struct AddOpImpl<FilterType, T,
// absl::Status $INTERCEPTOR_NAME(const $VALUE_TYPE&, FilterType*) // absl::Status $INTERCEPTOR_NAME(const $VALUE_TYPE&, FilterType*)
template <typename FilterType, typename T, template <typename FilterType, typename T,
absl::Status (FilterType::Call::* impl)( absl::Status (FilterType::Call::*impl)(
const typename T::element_type&, FilterType*)> const typename T::element_type&, FilterType*)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
absl::Status (FilterType::Call::*)( absl::Status (FilterType::Call::*)(
@ -549,7 +549,7 @@ struct AddOpImpl<FilterType, T,
// absl::StatusOr<$VALUE_HANDLE> $INTERCEPTOR_NAME($VALUE_HANDLE, FilterType*) // absl::StatusOr<$VALUE_HANDLE> $INTERCEPTOR_NAME($VALUE_HANDLE, FilterType*)
template <typename FilterType, typename T, template <typename FilterType, typename T,
absl::StatusOr<T> (FilterType::Call::* impl)(T, FilterType*)> absl::StatusOr<T> (FilterType::Call::*impl)(T, FilterType*)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
absl::StatusOr<T> (FilterType::Call::*)(T, FilterType*), absl::StatusOr<T> (FilterType::Call::*)(T, FilterType*),
impl> { impl> {
@ -576,7 +576,7 @@ struct AddOpImpl<FilterType, T,
// ServerMetadataHandle $INTERCEPTOR_NAME($VALUE_TYPE&) // ServerMetadataHandle $INTERCEPTOR_NAME($VALUE_TYPE&)
template <typename FilterType, typename T, template <typename FilterType, typename T,
ServerMetadataHandle (FilterType::Call::* impl)( ServerMetadataHandle (FilterType::Call::*impl)(
typename T::element_type&)> typename T::element_type&)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
ServerMetadataHandle (FilterType::Call::*)( ServerMetadataHandle (FilterType::Call::*)(
@ -604,7 +604,7 @@ struct AddOpImpl<FilterType, T,
// ServerMetadataHandle $INTERCEPTOR_NAME(const $VALUE_TYPE&) // ServerMetadataHandle $INTERCEPTOR_NAME(const $VALUE_TYPE&)
template <typename FilterType, typename T, template <typename FilterType, typename T,
ServerMetadataHandle (FilterType::Call::* impl)( ServerMetadataHandle (FilterType::Call::*impl)(
const typename T::element_type&)> const typename T::element_type&)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
ServerMetadataHandle (FilterType::Call::*)( ServerMetadataHandle (FilterType::Call::*)(
@ -632,7 +632,7 @@ struct AddOpImpl<FilterType, T,
// ServerMetadataHandle $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*) // ServerMetadataHandle $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*)
template <typename FilterType, typename T, template <typename FilterType, typename T,
ServerMetadataHandle (FilterType::Call::* impl)( ServerMetadataHandle (FilterType::Call::*impl)(
typename T::element_type&, FilterType*)> typename T::element_type&, FilterType*)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
ServerMetadataHandle (FilterType::Call::*)( ServerMetadataHandle (FilterType::Call::*)(
@ -661,7 +661,7 @@ struct AddOpImpl<FilterType, T,
// ServerMetadataHandle $INTERCEPTOR_NAME(const $VALUE_TYPE&, FilterType*) // ServerMetadataHandle $INTERCEPTOR_NAME(const $VALUE_TYPE&, FilterType*)
template <typename FilterType, typename T, template <typename FilterType, typename T,
ServerMetadataHandle (FilterType::Call::* impl)( ServerMetadataHandle (FilterType::Call::*impl)(
const typename T::element_type&, FilterType*)> const typename T::element_type&, FilterType*)>
struct AddOpImpl<FilterType, T, struct AddOpImpl<FilterType, T,
ServerMetadataHandle (FilterType::Call::*)( ServerMetadataHandle (FilterType::Call::*)(
@ -690,7 +690,7 @@ struct AddOpImpl<FilterType, T,
// PROMISE_RETURNING(absl::Status) $INTERCEPTOR_NAME($VALUE_TYPE&) // PROMISE_RETURNING(absl::Status) $INTERCEPTOR_NAME($VALUE_TYPE&)
template <typename FilterType, typename T, typename R, template <typename FilterType, typename T, typename R,
R (FilterType::Call::* impl)(typename T::element_type&)> R (FilterType::Call::*impl)(typename T::element_type&)>
struct AddOpImpl< struct AddOpImpl<
FilterType, T, R (FilterType::Call::*)(typename T::element_type&), impl, FilterType, T, R (FilterType::Call::*)(typename T::element_type&), impl,
absl::enable_if_t<std::is_same<absl::Status, PromiseResult<R>>::value>> { absl::enable_if_t<std::is_same<absl::Status, PromiseResult<R>>::value>> {
@ -740,7 +740,7 @@ struct AddOpImpl<
// PROMISE_RETURNING(absl::Status) $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*) // PROMISE_RETURNING(absl::Status) $INTERCEPTOR_NAME($VALUE_TYPE&, FilterType*)
template <typename FilterType, typename T, typename R, template <typename FilterType, typename T, typename R,
R (FilterType::Call::* impl)(typename T::element_type&, FilterType*)> R (FilterType::Call::*impl)(typename T::element_type&, FilterType*)>
struct AddOpImpl< struct AddOpImpl<
FilterType, T, FilterType, T,
R (FilterType::Call::*)(typename T::element_type&, FilterType*), impl, R (FilterType::Call::*)(typename T::element_type&, FilterType*), impl,
@ -795,7 +795,7 @@ struct AddOpImpl<
// PROMISE_RETURNING(absl::StatusOr<$VALUE_HANDLE>) // PROMISE_RETURNING(absl::StatusOr<$VALUE_HANDLE>)
// $INTERCEPTOR_NAME($VALUE_HANDLE, FilterType*) // $INTERCEPTOR_NAME($VALUE_HANDLE, FilterType*)
template <typename FilterType, typename T, typename R, template <typename FilterType, typename T, typename R,
R (FilterType::Call::* impl)(T, FilterType*)> R (FilterType::Call::*impl)(T, FilterType*)>
struct AddOpImpl<FilterType, T, R (FilterType::Call::*)(T, FilterType*), impl, struct AddOpImpl<FilterType, T, R (FilterType::Call::*)(T, FilterType*), impl,
absl::enable_if_t<std::is_same<absl::StatusOr<T>, absl::enable_if_t<std::is_same<absl::StatusOr<T>,
PromiseResult<R>>::value>> { PromiseResult<R>>::value>> {
@ -1030,7 +1030,7 @@ struct StackData {
template <typename FilterType> template <typename FilterType>
void AddFinalizer(FilterType* channel_data, size_t call_offset, void AddFinalizer(FilterType* channel_data, size_t call_offset,
void (FilterType::Call::* p)(const grpc_call_final_info*)) { void (FilterType::Call::*p)(const grpc_call_final_info*)) {
DCHECK(p == &FilterType::Call::OnFinalize); DCHECK(p == &FilterType::Call::OnFinalize);
finalizers.push_back(Finalizer{ finalizers.push_back(Finalizer{
channel_data, channel_data,
@ -1044,8 +1044,8 @@ struct StackData {
template <typename FilterType> template <typename FilterType>
void AddFinalizer(FilterType* channel_data, size_t call_offset, void AddFinalizer(FilterType* channel_data, size_t call_offset,
void (FilterType::Call::* p)(const grpc_call_final_info*, void (FilterType::Call::*p)(const grpc_call_final_info*,
FilterType*)) { FilterType*)) {
DCHECK(p == &FilterType::Call::OnFinalize); DCHECK(p == &FilterType::Call::OnFinalize);
finalizers.push_back(Finalizer{ finalizers.push_back(Finalizer{
channel_data, channel_data,
@ -1297,9 +1297,9 @@ class CallFilters {
private: private:
template <typename Output, typename Input, template <typename Output, typename Input,
Input(CallFilters::* input_location), Input(CallFilters::*input_location),
filters_detail::Layout<Input>(filters_detail::StackData::* layout), filters_detail::Layout<Input>(filters_detail::StackData::*layout),
void (CallState::* on_done)(), typename StackIterator> void (CallState::*on_done)(), typename StackIterator>
class Executor { class Executor {
public: public:
Executor(CallFilters* filters, StackIterator stack_begin, Executor(CallFilters* filters, StackIterator stack_begin,

@ -105,7 +105,7 @@ class Interceptor : public UnstartedCallDestination {
return Map(call_handler.PullClientInitialMetadata(), return Map(call_handler.PullClientInitialMetadata(),
[call_handler, destination = wrapped_destination_]( [call_handler, destination = wrapped_destination_](
ValueOrFailure<ClientMetadataHandle> metadata) mutable ValueOrFailure<ClientMetadataHandle> metadata) mutable
-> ValueOrFailure<HijackedCall> { -> ValueOrFailure<HijackedCall> {
if (!metadata.ok()) return Failure{}; if (!metadata.ok()) return Failure{};
return HijackedCall(std::move(metadata.value()), return HijackedCall(std::move(metadata.value()),
std::move(destination), std::move(destination),

Loading…
Cancel
Save