summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neben <alexander.neben@mongodb.com>2022-06-22 23:41:00 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-06-23 01:01:01 +0000
commitc798b60a95cbcf43145a5c31061b553ba86bd2e0 (patch)
treec03ba8ef363cf13c4a7c32825b14fbc51ce6dc87
parenta6977c4214e29c077bfc93cca9723d5ceb66e855 (diff)
downloadmongo-c798b60a95cbcf43145a5c31061b553ba86bd2e0.tar.gz
SERVER-67134 Fixed assert logging (bugprone-lambda-function-name)
-rw-r--r--src/mongo/util/assert_util.h13
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) \