everywhere: Replace diagnostic pragmas with TOOLCHAIN_* macros

The TOOLCHAIN_DISABLE_WARNING/TOOLCHAIN_ENABLE_WARNING macros are easier
to read and compiler agnostic.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
This commit is contained in:
Tom Hughes 2025-01-15 16:32:52 -08:00 committed by Benjamin Cabé
commit 11d70c61e5
18 changed files with 71 additions and 133 deletions

View file

@ -236,8 +236,7 @@ void TServerFramework::newlyConnectedClient(const shared_ptr<TConnectedClient> &
onClientConnected(pClient);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
TOOLCHAIN_DISABLE_WARNING(TOOLCHAIN_WARNING_DELETE_NON_VIRTUAL_DTOR)
void TServerFramework::disposeConnectedClient(TConnectedClient *pClient)
{
onClientDisconnected(pClient);
@ -248,7 +247,7 @@ void TServerFramework::disposeConnectedClient(TConnectedClient *pClient)
// mon_.notify();
}
}
#pragma GCC diagnostic pop
TOOLCHAIN_ENABLE_WARNING(TOOLCHAIN_WARNING_DELETE_NON_VIRTUAL_DTOR)
} // namespace server
} // namespace thrift