Bunch of warning fixes

This commit is contained in:
Martin Hořeňovský
2020-02-21 21:13:57 +01:00
parent 04f18d996b
commit 34e7a5e0cf
3 changed files with 16 additions and 2 deletions

View File

@@ -16,11 +16,25 @@ struct foo {
}
};
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wglobal-constructors"
#endif
// Construct foo, but `foo::print` should not be run
foo f;
#if defined(__clang__)
// The test is unused since the registration is disabled
#pragma clang diagnostic ignored "-Wunused-function"
#endif
// This test should not be run, because it won't be registered
TEST_CASE( "Disabled Macros" ) {
std::cout << "This should not happen\n";
FAIL();
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif