[clang] efad188 - Fix uncounted-obj-arg.cpp for Windows. (#81903)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 15 11:12:21 PST 2024
Author: Ryosuke Niwa
Date: 2024-02-15T11:12:17-08:00
New Revision: efad1885bfbda7f456e0e6e1db660fe55515a4b9
URL: https://github.com/llvm/llvm-project/commit/efad1885bfbda7f456e0e6e1db660fe55515a4b9
DIFF: https://github.com/llvm/llvm-project/commit/efad1885bfbda7f456e0e6e1db660fe55515a4b9.diff
LOG: Fix uncounted-obj-arg.cpp for Windows. (#81903)
Added:
Modified:
clang/test/Analysis/Checkers/WebKit/uncounted-obj-arg.cpp
Removed:
################################################################################
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; }
More information about the cfe-commits
mailing list