1 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s 2 // expected-no-diagnostics 3 4 #include "mock-types.h" 5 6 class RefCounted { 7 public: 8 void ref() const; 9 void deref() const; 10 }; 11 12 class Object { 13 public: 14 void ref() const; 15 void deref() const; 16 void someFunction(RefCounted&); 17 }; 18 19 RefPtr<Object> object(); 20 RefPtr<RefCounted> protectedTargetObject(); 21 testFunction()22void testFunction() { 23 if (RefPtr obj = object()) 24 obj->someFunction(*protectedTargetObject()); 25 } 26