1 // RUN: %clang_analyze_cc1 -analyzer-checker=webkit.RefCntblBaseVirtualDtor -verify %s
9 struct DerivedClassTmpl1
: T
{ };
10 // expected-warning@-1{{Struct 'RefCntblBase' is used as a base of struct 'DerivedClassTmpl1<RefCntblBase>' but doesn't have virtual destructor}}
12 DerivedClassTmpl1
<RefCntblBase
> a
;
17 struct DerivedClassTmpl2
: T
{ };
18 // expected-warning@-1{{Struct 'RefCntblBase' is used as a base of struct 'DerivedClassTmpl2<RefCntblBase>' but doesn't have virtual destructor}}
20 template<class T
> int foo(T
) { DerivedClassTmpl2
<T
> f
; return 42; }
21 int b
= foo(RefCntblBase
{});
26 struct DerivedClassTmpl3
: T
{ };
27 // expected-warning@-1{{Struct 'RefCntblBase' is used as a base of struct 'DerivedClassTmpl3<RefCntblBase>' but doesn't have virtual destructor}}
29 typedef DerivedClassTmpl3
<RefCntblBase
> Foo
;