mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
DCHECK_IS_ON needs ()
Found in the course of reintroducing this bug elsewhere R=danakj@chromium.org, mark@chromium.org Review URL: https://codereview.chromium.org/1287043005 . Patch from Nick Carter <nick@chromium.org>.
This commit is contained in:
parent
eb7ca8c374
commit
ad09fd1bc8
@ -276,7 +276,7 @@ TEST(SimpleStringDictionary, OutOfSpace) {
|
||||
EXPECT_FALSE(map.GetValueForKey("c"));
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON
|
||||
#if DCHECK_IS_ON()
|
||||
|
||||
TEST(SimpleStringDictionaryDeathTest, NullKey) {
|
||||
TSimpleStringDictionary<4, 6, 6> map;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
#if DCHECK_IS_ON
|
||||
#if DCHECK_IS_ON()
|
||||
|
||||
InitializationStateDcheck::State InitializationStateDcheck::SetInitializing() {
|
||||
State old_state = state();
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
#if DCHECK_IS_ON || DOXYGEN
|
||||
#if DCHECK_IS_ON() || DOXYGEN
|
||||
|
||||
//! \brief Tracks whether data are initialized, triggering a DCHECK assertion
|
||||
//! on an invalid data access.
|
||||
@ -168,7 +168,7 @@ struct InitializationStateDcheck {
|
||||
// technically invalid according to the standard, but clang and g++ accept them
|
||||
// without complaint even with warnings turned up. They take up no space at all,
|
||||
// and they can be “initialized” with the same () syntax used to initialize
|
||||
// objects of the DCHECK_IS_ON InitializationStateDcheck class above.
|
||||
// objects of the DCHECK_IS_ON() InitializationStateDcheck class above.
|
||||
using InitializationStateDcheck = bool[0];
|
||||
#endif // COMPILER_MSVC
|
||||
|
||||
|
@ -29,7 +29,7 @@ TEST(InitializationStateDcheck, InitializationStateDcheck) {
|
||||
INITIALIZATION_STATE_DCHECK_VALID(initialization_state_dcheck);
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON
|
||||
#if DCHECK_IS_ON()
|
||||
|
||||
// InitializationStateDcheck only DCHECKs, so the death tests can only run
|
||||
// when DCHECKs are enabled.
|
||||
|
Loading…
x
Reference in New Issue
Block a user