diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/util/assert_util.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mongo/util/assert_util.h b/src/mongo/util/assert_util.h index 75be98e5734..71ed502aecc 100644 --- a/src/mongo/util/assert_util.h +++ b/src/mongo/util/assert_util.h @@ -481,12 +481,13 @@ inline void massertStatusOKWithLocation(const Status& status, const char* file, } } -#define MONGO_BASE_ASSERT_VA_FAILED(fail_func, ...) \ - do { \ - [&]() MONGO_COMPILER_COLD_FUNCTION { \ - fail_func(::mongo::error_details::makeStatus(__VA_ARGS__), MONGO_SOURCE_LOCATION()); \ - }(); \ - MONGO_COMPILER_UNREACHABLE; \ +#define MONGO_BASE_ASSERT_VA_FAILED(fail_func, ...) \ + do { \ + auto mongoSourceLocation = MONGO_SOURCE_LOCATION(); \ + [&]() MONGO_COMPILER_COLD_FUNCTION { \ + fail_func(::mongo::error_details::makeStatus(__VA_ARGS__), mongoSourceLocation); \ + }(); \ + MONGO_COMPILER_UNREACHABLE; \ } while (false) #define MONGO_BASE_ASSERT_VA_4(fail_func, code, msg, cond) \ |