forked from OSchip/llvm-project
tsan: qualify autos
clang-tidy warning requires qualifying auto pointers: clang-tidy: warning: 'auto ctx' can be declared as 'auto *ctx' [llvm-qualified-auto] Fix remaing cases we have in tsan. Depends on D107561. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D107562
This commit is contained in:
parent
cb7b0a5f34
commit
c6a485caf6
|
@ -99,7 +99,7 @@ ReportLocation *SymbolizeData(uptr addr) {
|
||||||
MBlock *b = ctx->metamap.GetBlock(cbctx.start);
|
MBlock *b = ctx->metamap.GetBlock(cbctx.start);
|
||||||
if (!b)
|
if (!b)
|
||||||
return 0;
|
return 0;
|
||||||
auto loc = New<ReportLocation>();
|
auto *loc = New<ReportLocation>();
|
||||||
loc->type = ReportLocationHeap;
|
loc->type = ReportLocationHeap;
|
||||||
loc->heap_chunk_start = cbctx.start;
|
loc->heap_chunk_start = cbctx.start;
|
||||||
loc->heap_chunk_size = b->siz;
|
loc->heap_chunk_size = b->siz;
|
||||||
|
@ -107,7 +107,7 @@ ReportLocation *SymbolizeData(uptr addr) {
|
||||||
loc->stack = SymbolizeStackId(b->stk);
|
loc->stack = SymbolizeStackId(b->stk);
|
||||||
return loc;
|
return loc;
|
||||||
} else {
|
} else {
|
||||||
auto loc = New<ReportLocation>();
|
auto *loc = New<ReportLocation>();
|
||||||
loc->type = ReportLocationGlobal;
|
loc->type = ReportLocationGlobal;
|
||||||
loc->global.name = internal_strdup(cbctx.name ? cbctx.name : "??");
|
loc->global.name = internal_strdup(cbctx.name ? cbctx.name : "??");
|
||||||
loc->global.file = internal_strdup(cbctx.file ? cbctx.file : "??");
|
loc->global.file = internal_strdup(cbctx.file ? cbctx.file : "??");
|
||||||
|
@ -140,7 +140,7 @@ Processor *ThreadState::proc() {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
static ThreadState *AllocGoroutine() {
|
static ThreadState *AllocGoroutine() {
|
||||||
auto thr = (ThreadState *)Alloc(sizeof(ThreadState));
|
auto *thr = (ThreadState *)Alloc(sizeof(ThreadState));
|
||||||
internal_memset(thr, 0, sizeof(*thr));
|
internal_memset(thr, 0, sizeof(*thr));
|
||||||
return thr;
|
return thr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -562,7 +562,7 @@ NOINLINE
|
||||||
void GrowShadowStack(ThreadState *thr) {
|
void GrowShadowStack(ThreadState *thr) {
|
||||||
const int sz = thr->shadow_stack_end - thr->shadow_stack;
|
const int sz = thr->shadow_stack_end - thr->shadow_stack;
|
||||||
const int newsz = 2 * sz;
|
const int newsz = 2 * sz;
|
||||||
auto newstack = (uptr *)Alloc(newsz * sizeof(uptr));
|
auto *newstack = (uptr *)Alloc(newsz * sizeof(uptr));
|
||||||
internal_memcpy(newstack, thr->shadow_stack, sz * sizeof(uptr));
|
internal_memcpy(newstack, thr->shadow_stack, sz * sizeof(uptr));
|
||||||
Free(thr->shadow_stack);
|
Free(thr->shadow_stack);
|
||||||
thr->shadow_stack = newstack;
|
thr->shadow_stack = newstack;
|
||||||
|
|
Loading…
Reference in New Issue