diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2021-05-11 13:56:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 14:56:00 +0300 |
commit | 7d0d9061d83b663ce05d9de5da3d5865a3845b79 (patch) | |
tree | 7058d6f00d4c24052269af7afc1da0629e7a9e51 /test/skip_with_error_test.cc | |
parent | 3b508fad1f9fbc970dad0a190119ae6284cad855 (diff) | |
download | google-benchmark-7d0d9061d83b663ce05d9de5da3d5865a3845b79.tar.gz |
Support -Wsuggest-override (#1059)
* Support -Wsuggest-override
google/benchmark is C++11 compatible but doesn't use the `override` keyword.
Projects using google/benchmark with enabled `-Wsuggest-override` and `-Werror` will fail to compile.
* Add -Wsuggest-override cxx flag
* Revert unrelated formatting
* Revert unrelated formatting, take 2
* Revert unrelated formatting, take 3
* Disable -Wsuggest-override when compiling tests, gtest does not handle it yet
Co-authored-by: Dominic Hamon <dominichamon@users.noreply.github.com>
Diffstat (limited to 'test/skip_with_error_test.cc')
-rw-r--r-- | test/skip_with_error_test.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/skip_with_error_test.cc b/test/skip_with_error_test.cc index 97a2e3c..827966e 100644 --- a/test/skip_with_error_test.cc +++ b/test/skip_with_error_test.cc @@ -10,11 +10,11 @@ namespace { class TestReporter : public benchmark::ConsoleReporter { public: - virtual bool ReportContext(const Context& context) { + virtual bool ReportContext(const Context& context) BENCHMARK_OVERRIDE { return ConsoleReporter::ReportContext(context); }; - virtual void ReportRuns(const std::vector<Run>& report) { + virtual void ReportRuns(const std::vector<Run>& report) BENCHMARK_OVERRIDE { all_runs_.insert(all_runs_.end(), begin(report), end(report)); ConsoleReporter::ReportRuns(report); } |