Debian Codegraph @

clang/test/Analysis/Checkers/WebKit/implicit-cast-to-base-class-with-deref-in-superclass.cpp

raw
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 Base {
7 public:
8 virtual ~Base();
9 void ref() const;
10 void deref() const;
11 };
12
13 class Event : public Base {
14 protected:
15 explicit Event();
16 };
17
18 class SubEvent : public Event {
19 public:
20 static Ref<SubEvent> create();
21 private:
22 SubEvent() = default;
23 };
24
25 void someFunction(Base&);
26
27 static void test()
28 {
29 someFunction(SubEvent::create());
30 }