[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-09 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/141277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-09 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/141277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-07 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/141277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-06 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/141277 >From b29b369a5b26869916101e45aa4580a5f7de3907 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 23 May 2025 11:42:20 -0700 Subject: [PATCH 1/2] [WebKit checkers] Add an annotation for pointer conversion. T

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-06 Thread Ryosuke Niwa via cfe-commits
@@ -44,6 +43,12 @@ inline Target* uncheckedDowncast(Source* source) return static_cast(source); } +template +Target* [[clang::annotate_type("webkit.pointerconversion")]] newCastFunction(Source*); rniwa wrote: I don't think so. I added a test case for tha

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-06-05 Thread Ziqing Luo via cfe-commits
@@ -44,6 +43,12 @@ inline Target* uncheckedDowncast(Source* source) return static_cast(source); } +template +Target* [[clang::annotate_type("webkit.pointerconversion")]] newCastFunction(Source*); ziqingluo-90 wrote: If this function is a member function,

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes This PR adds the WebKit checker support for [[clang::annotate_type("webkit.pointerconversion")]]. When this attribute is set on the return value of a function, the function is treated as safe to call anywhere

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-05-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR adds the WebKit checker support for [[clang::annotate_type("webkit.pointerconversion")]]. When this attribute is set on the return value of a function, the function is treated as saf

[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)

2025-05-23 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/141277 This PR adds the WebKit checker support for [[clang::annotate_type("webkit.pointerconversion")]]. When this attribute is set on the return value of a function, the function is treated as safe to call anywhere an