[compiler-rt] [NFC][TSan] Tidy up DPrintf warnings in TSan runtime (PR #161371)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 30 06:14:33 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- compiler-rt/lib/tsan/rtl/tsan_fd.cpp compiler-rt/lib/tsan/rtl/tsan_rtl.cpp compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/tsan/rtl/tsan_fd.cpp b/compiler-rt/lib/tsan/rtl/tsan_fd.cpp
index 86538bbad..513474c8f 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_fd.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_fd.cpp
@@ -180,7 +180,7 @@ void FdAcquire(ThreadState *thr, uptr pc, int fd) {
return;
FdDesc *d = fddesc(thr, pc, fd);
FdSync *s = d->sync;
- DPrintf("#%d: FdAcquire(%d) -> %p\n", thr->tid, fd, (void *)s);
+ DPrintf("#%d: FdAcquire(%d) -> %p\n", thr->tid, fd, (void*)s);
MemoryAccess(thr, pc, (uptr)d, 8, kAccessRead);
if (s)
Acquire(thr, pc, (uptr)s);
@@ -191,7 +191,7 @@ void FdRelease(ThreadState *thr, uptr pc, int fd) {
return;
FdDesc *d = fddesc(thr, pc, fd);
FdSync *s = d->sync;
- DPrintf("#%d: FdRelease(%d) -> %p\n", thr->tid, fd, (void *)s);
+ DPrintf("#%d: FdRelease(%d) -> %p\n", thr->tid, fd, (void*)s);
MemoryAccess(thr, pc, (uptr)d, 8, kAccessRead);
if (s)
Release(thr, pc, (uptr)s);
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
index edfb3373e..82d04963d 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp
@@ -512,7 +512,7 @@ bool RestoreStack(EventType type, Sid sid, Epoch epoch, uptr addr, uptr size,
first_part = trace->parts.Front();
if (!first_part) {
DPrintf2("RestoreStack: tid=%d trace=%p no trace parts\n", tid,
- (void *)trace);
+ (void*)trace);
return false;
}
last_part = trace->parts.Back();
@@ -528,7 +528,7 @@ bool RestoreStack(EventType type, Sid sid, Epoch epoch, uptr addr, uptr size,
bool is_atomic = typ & kAccessAtomic;
bool is_free = typ & kAccessFree;
DPrintf2("RestoreStack: tid=%d parts=[%p-%p] last_pos=%p\n", tid,
- (void *)trace->parts.Front(), (void *)last_part, (void *)last_pos);
+ (void*)trace->parts.Front(), (void*)last_part, (void*)last_pos);
TraceReplay(
trace, last_part, last_pos, sid, epoch,
[&](Sid ev_sid, Epoch ev_epoch, Event *evp) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/161371
More information about the llvm-commits
mailing list