[compiler-rt] Revert "[NFC] Fix CodeQL violations in compiler-rt." (PR #157907)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 10:27:57 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,h -- compiler-rt/lib/dfsan/dfsan.cpp compiler-rt/lib/fuzzer/FuzzerCorpus.h compiler-rt/lib/fuzzer/FuzzerDriver.cpp compiler-rt/lib/fuzzer/FuzzerLoop.cpp compiler-rt/lib/hwasan/hwasan_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/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp
index 6eafcf916..e8fe75535 100644
--- a/compiler-rt/lib/hwasan/hwasan_report.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -740,7 +740,7 @@ void BaseReport::PrintHeapOrGlobalCandidate() const {
Printf("%p is located %zd bytes %s a %zd-byte region [%p,%p)\n",
untagged_addr, offset, whence,
candidate.heap.end - candidate.heap.begin,
- (void *)candidate.heap.begin, (void *)candidate.heap.end);
+ (void*)candidate.heap.begin, (void*)candidate.heap.end);
Printf("%s", d.Allocation());
Printf("allocated by thread T%u here:\n", candidate.heap.thread_id);
Printf("%s", d.Default());
@@ -775,14 +775,14 @@ void BaseReport::PrintHeapOrGlobalCandidate() const {
Printf(
"%p is located %s a global variable in "
"\n #0 0x%x (%s+0x%x)\n",
- (void *)untagged_addr, candidate.after ? "after" : "before",
- (void *)candidate.untagged_addr, module_name, (u32)module_address);
+ (void*)untagged_addr, candidate.after ? "after" : "before",
+ (void*)candidate.untagged_addr, module_name, (u32)module_address);
else
Printf(
"%p is located %s a %zd-byte global variable in "
"\n #0 0x%x (%s+0x%x)\n",
- (void *)untagged_addr, candidate.after ? "after" : "before", size,
- (void *)candidate.untagged_addr, module_name, (u32)module_address);
+ (void*)untagged_addr, candidate.after ? "after" : "before", size,
+ (void*)candidate.untagged_addr, module_name, (u32)module_address);
}
Printf("%s", d.Default());
}
@@ -843,9 +843,9 @@ void BaseReport::PrintAddressDescription() const {
Printf("\nCause: use-after-free\n");
Printf("%s", d.Location());
Printf("%p is located %zd bytes inside a %zd-byte region [%p,%p)\n",
- (void *)untagged_addr, untagged_addr - UntagAddr(har.tagged_addr),
+ (void*)untagged_addr, untagged_addr - UntagAddr(har.tagged_addr),
(ssize)har.requested_size, UntagAddr(har.tagged_addr),
- (void *)(UntagAddr(har.tagged_addr) + har.requested_size));
+ (void*)(UntagAddr(har.tagged_addr) + har.requested_size));
Printf("%s", d.Allocation());
Printf("freed by thread T%u here:\n", ha.free_thread_id);
Printf("%s", d.Default());
``````````
</details>
https://github.com/llvm/llvm-project/pull/157907
More information about the llvm-commits
mailing list