aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnji Cooper <yaneurabeya@gmail.com>2019-02-13 09:45:53 -0800
committerEnji Cooper <yaneurabeya@gmail.com>2019-02-13 14:38:51 -0800
commit5388473acfb6c75dab2236ad425980ffa4bf4b39 (patch)
tree1691f85dabaa7bb3f59fc820d5a486e5e01f2e24
parentd850e144710e330070b756c009749dc7a7302301 (diff)
downloadgoogletest-5388473acfb6c75dab2236ad425980ffa4bf4b39.tar.gz
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>
-rw-r--r--googlemock/test/gmock-matchers_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/googlemock/test/gmock-matchers_test.cc b/googlemock/test/gmock-matchers_test.cc
index cdca2300..b586d276 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