Googletest export

Use override instead of virtual for destructor

https://google.github.io/styleguide/cppguide.html says: "Explicitly annotate overrides of virtual functions or virtual destructors with exactly one of an override or (less frequently) final specifier. Do not use virtual when declaring an override". The mocked class _should_ have a virtual destructor most of the times.

PiperOrigin-RevId: 342082140
This commit is contained in:
Abseil Team 2020-11-12 13:45:58 -05:00 committed by Mark Barolak
parent 0e202cdbe3
commit 9dce5e5d87

View File

@ -3078,7 +3078,7 @@ class MockFoo : public Foo {
...
// Add the following two lines to the mock class.
MOCK_METHOD(void, Die, ());
virtual ~MockFoo() { Die(); }
~MockFoo() override { Die(); }
};
```