mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Add -Wmissing-variable-declarations to common warnings
This commit is contained in:
parent
7752229105
commit
d2cb934d28
@ -64,6 +64,7 @@ function(add_warnings_to_targets targets)
|
|||||||
"-Wmissing-braces"
|
"-Wmissing-braces"
|
||||||
"-Wmissing-declarations"
|
"-Wmissing-declarations"
|
||||||
"-Wmissing-noreturn"
|
"-Wmissing-noreturn"
|
||||||
|
"-Wmissing-variable-declarations"
|
||||||
"-Wnull-dereference"
|
"-Wnull-dereference"
|
||||||
"-Wold-style-cast"
|
"-Wold-style-cast"
|
||||||
"-Woverloaded-virtual"
|
"-Woverloaded-virtual"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
namespace Catch {
|
namespace Catch {
|
||||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
|
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
|
||||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
|
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
|
||||||
LeakDetector leakDetector;
|
static LeakDetector leakDetector;
|
||||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ struct foo {
|
|||||||
#pragma clang diagnostic ignored "-Wglobal-constructors"
|
#pragma clang diagnostic ignored "-Wglobal-constructors"
|
||||||
#endif
|
#endif
|
||||||
// Construct foo, but `foo::print` should not be run
|
// Construct foo, but `foo::print` should not be run
|
||||||
foo f;
|
static foo f;
|
||||||
|
|
||||||
|
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
|
Loading…
Reference in New Issue
Block a user