diff options
author | Enji Cooper <yaneurabeya@gmail.com> | 2019-02-13 17:45:53 (GMT) |
---|---|---|
committer | Enji Cooper <yaneurabeya@gmail.com> | 2019-02-13 22:38:51 (GMT) |
commit | 5388473acfb6c75dab2236ad425980ffa4bf4b39 (patch) | |
tree | 1691f85dabaa7bb3f59fc820d5a486e5e01f2e24 /googlemock/test/gmock-matchers_test.cc | |
parent | d850e144710e330070b756c009749dc7a7302301 (diff) | |
download | googletest-5388473acfb6c75dab2236ad425980ffa4bf4b39.zip googletest-5388473acfb6c75dab2236ad425980ffa4bf4b39.tar.gz googletest-5388473acfb6c75dab2236ad425980ffa4bf4b39.tar.bz2 |
Fix clang `-Winconsistent-missing-override` warnings
`DescribeTo(..)` and `MatchAndExplain(..)` in `gmock-matchers_test` both
override virtual methods. Remove the `virtual` keyword and apply `override` to
them instead.
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Diffstat (limited to 'googlemock/test/gmock-matchers_test.cc')
-rw-r--r-- | googlemock/test/gmock-matchers_test.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc index cdca230..b586d27 100644 --- a/googlemock/test/gmock-matchers_test.cc +++ b/googlemock/test/gmock-matchers_test.cc @@ -6943,10 +6943,10 @@ TEST(ArgsTest, ExplainsMatchResultWithoutInnerExplanation) { // For testing Args<>'s explanation. class LessThanMatcher : public MatcherInterface<std::tuple<char, int> > { public: - virtual void DescribeTo(::std::ostream* os) const {} + void DescribeTo(::std::ostream* os) const override {} - virtual bool MatchAndExplain(std::tuple<char, int> value, - MatchResultListener* listener) const { + bool MatchAndExplain(std::tuple<char, int> value, + MatchResultListener* listener) const override { const int diff = std::get<0>(value) - std::get<1>(value); if (diff > 0) { *listener << "where the first value is " << diff |