Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Analysis / Checkers / WebKit / call-args-dynamic-downcast.cpp
blob28156623d9a0fd7e15e251342e7ed71197b578fd
1 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
2 // expected-no-diagnostics
4 class Base {
5 public:
6 inline void ref();
7 inline void deref();
8 };
10 class Derived : public Base {
11 public:
12 virtual ~Derived();
14 void ref() const;
15 void deref() const;
18 class SubDerived final : public Derived {
21 class OtherObject {
22 public:
23 Derived* obj();
26 template<typename Target, typename Source>
27 inline Target* dynamicDowncast(Source* source)
29 return static_cast<Target*>(source);
32 void foo(OtherObject* other)
34 dynamicDowncast<SubDerived>(other->obj());