Skip to content

fix explicit constructor in copy-initialization#6884

Merged
lizan merged 2 commits intoenvoyproxy:masterfrom
Mythra:fix-literal
May 10, 2019
Merged

fix explicit constructor in copy-initialization#6884
lizan merged 2 commits intoenvoyproxy:masterfrom
Mythra:fix-literal

Conversation

@Mythra
Copy link
Member

@Mythra Mythra commented May 9, 2019

Description:

commit: 4c80194#diff-5d52e6425da0cdb53f84da8906c0a968R602
happened to break our builds because of the use of return {}'s
it introduced into upstream_impl.cc (we use a toolchain built around
clang-9, to more accurately map with the rest of our tools). this
fixes that build error.

Risk Level: Low
Testing:

Testing is hard in this one since as far as I can tell it doesn't happen with the toolchain inside of envoy-build-ubuntu. However, I scrapped together a quick public image you can use to validate:

  1. Checkout master of envoy
  2. Run the following:
docker pull gcr.io/ecoan-1280/ggg-bazel-image:latest
docker run \
       -e "CC=clang" \
       -e "CXX=clang++" \
       -it --rm \
 --net=host \
       --cap-add SYS_PTRACE \
       -v "$(pwd)":"/mnt/envoy" \
       -w "/mnt/envoy" \
       "gcr.io/ecoan-1280/ggg-bazel-image:latest" \
       /bin/bash
$ bazel build //source/exe:envoy-static
  1. See build errors like:
source/common/upstream/upstream_impl.cc:735:10: error: chosen constructor is explicit in copy-initialization
  return {std::move(filtered_clones[0]), std::move(filtered_clones[1]),
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1. Checkout this commit into your branch.
  2. Re-run the docker steps again.
  3. Watch the build complete successfully.

Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Eric ecoan@rust-lang.life

commit: envoyproxy@4c80194#diff-5d52e6425da0cdb53f84da8906c0a968R602
happened to break our builds because of it's use of `return {}`'s
it introduced into upstream_impl.cc (we use a toolchain built around
clang-9, to more accurately map with the rest of our tools). this
fixes that build error.

Signed-off-by: Eric <ecoan@rust-lang.life>
Signed-off-by: Eric <ecoan@rust-lang.life>
@lizan lizan merged commit c833df9 into envoyproxy:master May 10, 2019
mpuncel added a commit to mpuncel/envoy that referenced this pull request May 10, 2019
* master: (88 commits)
  upstream: Null-deref on TCP health checker if setsockopt fails  (envoyproxy#6793)
  ci: switch macOS CI to azure pipelines (envoyproxy#6889)
  os syscalls lib: break apart syscalls used for hot restart (envoyproxy#6880)
  Kafka codec: precompute request size before serialization, so we do n… (envoyproxy#6862)
  upstream: move static and strict_dns clusters to dedicated files (envoyproxy#6886)
  Rollforward of api: Add total_issued_requests to Upstream Locality and Endpoint Stats. (envoyproxy#6692) (envoyproxy#6784)
  fix explicit constructor in copy-initialization (envoyproxy#6884)
  stats: use tag iterator rather than constructing the tag-array and searching that. (envoyproxy#6853)
  common: use unscoped build target in generate_version_linkstamp (envoyproxy#6877)
  Addendum to envoyproxy#6778 (envoyproxy#6882)
  ci: add minimum Linux build for Azure Pipelines (envoyproxy#6881)
  grpc: utilities for inter-converting grpc::ByteBuffer and Buffer::Instance. (envoyproxy#6732)
  upstream: allow excluding hosts from lb calculations until initial health check (envoyproxy#6794)
  stats: prevent unused counters from leaking across hot restart (envoyproxy#6850)
  network filters: add `injectDataToFilterChain(data, end_stream)` method to network filter callbacks (envoyproxy#6750)
  delete things that snuck back in (envoyproxy#6873)
  config: scoped rds (2b): support delta APIs in ConfigProvider framework (envoyproxy#6781)
  string == string! (envoyproxy#6868)
  config: add mssing imports to delta_subscription_state (envoyproxy#6869)
  protobuf: add missing default case to enum (envoyproxy#6870)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants