diff options
author | Copybara-Service <copybara-worker@google.com> | 2022-04-25 20:29:56 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-04-25 20:29:56 -0700 |
commit | b53547bf01ee6d5c547bc539a498c49bc6027169 (patch) | |
tree | df6a4ffa47f6be71376f565b6c963cc51cc8d7f9 | |
parent | bf66935e07825318ae519675d73d0f3e313b3ec6 (diff) | |
parent | d5ad28dbe14fca51038fb8c7610f11602b98f682 (diff) | |
download | googletest-b53547bf01ee6d5c547bc539a498c49bc6027169.zip googletest-b53547bf01ee6d5c547bc539a498c49bc6027169.tar.gz googletest-b53547bf01ee6d5c547bc539a498c49bc6027169.tar.bz2 |
Merge pull request #3797 from glandium:issue3514
PiperOrigin-RevId: 444444700
Change-Id: I8ac5cc96cc6eb9d583fa7e3fb304ef3dcaa95b5b
-rw-r--r-- | ci/linux-presubmit.sh | 3 | ||||
-rw-r--r-- | googletest/include/gtest/gtest-matchers.h | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ci/linux-presubmit.sh b/ci/linux-presubmit.sh index 7147188..8d00bca 100644 --- a/ci/linux-presubmit.sh +++ b/ci/linux-presubmit.sh @@ -76,6 +76,7 @@ time docker run \ /usr/local/bin/bazel test ... \ --copt="-Wall" \ --copt="-Werror" \ + --copt="-Wuninitialized" \ --copt="-Wno-error=pragmas" \ --keep_going \ --show_timestamps \ @@ -94,6 +95,7 @@ for std in ${STD}; do /usr/local/bin/bazel test ... \ --copt="-Wall" \ --copt="-Werror" \ + --copt="-Wuninitialized" \ --define="absl=${absl}" \ --distdir="/bazel-distdir" \ --keep_going \ @@ -116,6 +118,7 @@ for std in ${STD}; do --copt="--gcc-toolchain=/usr/local" \ --copt="-Wall" \ --copt="-Werror" \ + --copt="-Wuninitialized" \ --define="absl=${absl}" \ --distdir="/bazel-distdir" \ --keep_going \ diff --git a/googletest/include/gtest/gtest-matchers.h b/googletest/include/gtest/gtest-matchers.h index a11d016..bffa00c 100644 --- a/googletest/include/gtest/gtest-matchers.h +++ b/googletest/include/gtest/gtest-matchers.h @@ -303,17 +303,18 @@ class MatcherBase : private MatcherDescriberInterface { } protected: - MatcherBase() : vtable_(nullptr) {} + MatcherBase() : vtable_(nullptr), buffer_() {} // Constructs a matcher from its implementation. template <typename U> - explicit MatcherBase(const MatcherInterface<U>* impl) { + explicit MatcherBase(const MatcherInterface<U>* impl) + : vtable_(nullptr), buffer_() { Init(impl); } template <typename M, typename = typename std::remove_reference< M>::type::is_gtest_matcher> - MatcherBase(M&& m) { // NOLINT + MatcherBase(M&& m) : vtable_(nullptr), buffer_() { // NOLINT Init(std::forward<M>(m)); } |