[clang] Fix uncounted-obj-arg.cpp for Windows. (PR #81903)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 15 11:03:25 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Ryosuke Niwa (rniwa)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/81903.diff
1 Files Affected:
- (modified) clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp (+1-1)
``````````diff
diff --git a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
index 156a2480901bf0..338e1b685122bc 100644
--- a/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
@@ -107,7 +107,7 @@ class RefCounted {
return 0;
}
void *trivial15() { return static_cast<void*>(this); }
- unsigned long trivial16() { return reinterpret_cast<unsigned long>(this); }
+ unsigned long trivial16() { return *reinterpret_cast<unsigned long*>(this); }
RefCounted& trivial17() const { return const_cast<RefCounted&>(*this); }
RefCounted& trivial18() const { RELEASE_ASSERT(this, "this must be not null"); return const_cast<RefCounted&>(*this); }
void trivial19() const { return; }
``````````
</details>
https://github.com/llvm/llvm-project/pull/81903
More information about the cfe-commits
mailing list