[clang] [WebKit checkers] Add an annotation for pointer conversion. (PR #141277)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 5 22:49:43 PDT 2025
================
@@ -44,6 +43,12 @@ inline Target* uncheckedDowncast(Source* source)
return static_cast<Target*>(source);
}
+template<typename Target, typename Source>
+Target* [[clang::annotate_type("webkit.pointerconversion")]] newCastFunction(Source*);
----------------
ziqingluo-90 wrote:
If this function is a member function, will you accidentally take the implicit `this` object as the original argument?
https://github.com/llvm/llvm-project/pull/141277
More information about the cfe-commits
mailing list