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:50 (GMT) |
commit | 2147806d2d5c0e88f6a8cbecc722f4f15bde9783 (patch) | |
tree | 1691f85dabaa7bb3f59fc820d5a486e5e01f2e24 /googlemock | |
parent | d850e144710e330070b756c009749dc7a7302301 (diff) | |
download | googletest-2147806d2d5c0e88f6a8cbecc722f4f15bde9783.zip googletest-2147806d2d5c0e88f6a8cbecc722f4f15bde9783.tar.gz googletest-2147806d2d5c0e88f6a8cbecc722f4f15bde9783.tar.bz2 |
Fix clang `-Winconsistent-missing-override` warningsrefs/pull/2123/head
`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')
-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 |