Move CHECK stack traces to be before the message (#1216)

Before, if the llvm hook to print a stack trace on CHECK was bound, it would trace after the message rather than before the message. I'm thinking swapping the order will generally be easier to debug.
This commit is contained in:
Jon Meow
2022-04-27 09:17:23 -07:00
committed by GitHub
parent 0e061d1c24
commit 8dee661adb
2 changed files with 17 additions and 3 deletions
+2
View File
@@ -14,6 +14,8 @@ TEST(CheckTest, CheckTrue) { CHECK(true); }
TEST(CheckTest, CheckFalse) {
// TODO: figure out why we can't use \\d+ instead of .+ in these patterns.
ASSERT_DEATH({ CHECK(false); },
"Stack trace:\n"
".+\n"
"CHECK failure at common/check_test.cpp:.+: false\n");
}