File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
clang/test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 11// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
22
3+ #include " mock-types.h"
4+
35class Base {
46public:
5- inline void ref ();
6- inline void deref ();
7+ void ref ();
8+ void deref ();
9+ void doWork ();
710};
811
912class Derived : public Base {
@@ -20,6 +23,7 @@ class SubDerived final : public Derived {
2023class OtherObject {
2124public:
2225 Derived* obj ();
26+ Base* base ();
2327};
2428
2529class String {
@@ -62,3 +66,12 @@ void foo(OtherObject* other)
6266 // expected-warning@-1{{Call argument is uncounted and unsafe}}
6367 toString (other->obj ());
6468}
69+
70+ struct SomeStruct {
71+ Derived* [[clang::annotate_type(" webkit.pointerconversion" )]] ptrConversion(Base*);
72+
73+ void foo (OtherObject& otherObj) {
74+ RefPtr ptr = otherObj.base ();
75+ ptrConversion (ptr.get ())->doWork ();
76+ }
77+ };
You can’t perform that action at this time.
0 commit comments