Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tcmalloc/internal/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,8 @@ void RecordCrash(absl::string_view detector, absl::string_view error) {
RecordTestFailure(detector, error);
}

ABSL_ATTRIBUTE_NOINLINE
ABSL_ATTRIBUTE_NORETURN
static void Crash(const char* filename, int line, const char* msg,
size_t msglen, bool oom) {
[[noreturn]] ABSL_ATTRIBUTE_NOINLINE static void Crash(
const char* filename, int line, const char* msg, size_t msglen, bool oom) {
StackTrace trace;
trace.depth = absl::GetStackTrace(trace.stack, kMaxStackDepth, 1);

Expand Down Expand Up @@ -184,8 +182,8 @@ static void Crash(const char* filename, int line, const char* msg,
abort();
}

ABSL_ATTRIBUTE_NORETURN void CheckFailed(const char* file, int line,
const char* msg, int msglen) {
[[noreturn]] void CheckFailed(const char* file, int line, const char* msg,
int msglen) {
Crash(file, line, msg, msglen, false);
}

Expand Down
8 changes: 4 additions & 4 deletions tcmalloc/internal/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ struct StackTrace {
__LINE__, ##__VA_ARGS__)

void RecordCrash(absl::string_view detector, absl::string_view error);
ABSL_ATTRIBUTE_NORETURN void CrashWithOOM(size_t alloc_size);
ABSL_ATTRIBUTE_NORETURN void CheckFailed(const char* file, int line,
const char* msg, int msglen);
[[noreturn]] void CrashWithOOM(size_t alloc_size);
[[noreturn]] void CheckFailed(const char* file, int line, const char* msg,
int msglen);

template <typename... Args>
ABSL_ATTRIBUTE_NORETURN ABSL_ATTRIBUTE_NOINLINE void CheckFailed(
[[noreturn]] ABSL_ATTRIBUTE_NOINLINE void CheckFailed(
const char* func, const char* file, int line,
const absl::FormatSpec<int, const char*, int, const char*, Args...>& format,
const Args&... args) {
Expand Down
Loading