mirror of https://github.com/google/benchmark.git
Destructor not returning is expected in some cases (#1316)
* Address MSVC C4722 warning in tests Some test paths deliberately exit, and it appears that the appropriate declspec does not stop the compiler generating the C4722 warning as one might expect. Per https://github.com/google/benchmark/issues/826#issuecomment-851995549 this commit ignores the warning for the affected call site. * Fix up Formatting * Fix up formatting issue on pragmas * Fix up formatting issue on pragmas take 2 Co-authored-by: Staffan Tjernstrom <staffantj@users.noreply.github.com>
This commit is contained in:
parent
6dfe7afbc3
commit
0e78738a25
|
@ -36,10 +36,17 @@ class CheckHandler {
|
|||
|
||||
LogType& GetLog() { return log_; }
|
||||
|
||||
#if defined(COMPILER_MSVC)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4722)
|
||||
#endif
|
||||
BENCHMARK_NORETURN ~CheckHandler() BENCHMARK_NOEXCEPT_OP(false) {
|
||||
log_ << std::endl;
|
||||
CallAbortHandler();
|
||||
}
|
||||
#if defined(COMPILER_MSVC)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
CheckHandler& operator=(const CheckHandler&) = delete;
|
||||
CheckHandler(const CheckHandler&) = delete;
|
||||
|
|
Loading…
Reference in New Issue