Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uncounted-obj-arg.cpp for Windows. #81903

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

rniwa
Copy link
Contributor

@rniwa rniwa commented Feb 15, 2024

No description provided.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Feb 15, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 15, 2024

@llvm/pr-subscribers-clang

Author: Ryosuke Niwa (rniwa)

Changes

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 --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; }

Copy link
Collaborator

@haoNoQ haoNoQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably works thanks!

@haoNoQ haoNoQ merged commit efad188 into llvm:main Feb 15, 2024
5 of 6 checks passed
@rniwa rniwa deleted the fid-uncounted-obj-arg-win branch February 15, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants