[NFC][AArch64] Explicitly define undefined bits for instructions (#122129)
[llvm-project.git] / clang / test / Analysis / Checkers / WebKit / call-args-safe-functions.cpp
bloba87446564870cde976a9e421fc72136143d1ac26
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 class String {
29 template<typename Target, typename Source>
30 inline Target* dynamicDowncast(Source* source)
32 return static_cast<Target*>(source);
35 template<typename Target, typename Source>
36 inline Target* checkedDowncast(Source* source)
38 return static_cast<Target*>(source);
41 template<typename Target, typename Source>
42 inline Target* uncheckedDowncast(Source* source)
44 return static_cast<Target*>(source);
47 template<typename... Types>
48 String toString(const Types&... values);
50 void foo(OtherObject* other)
52 dynamicDowncast<SubDerived>(other->obj());
53 checkedDowncast<SubDerived>(other->obj());
54 uncheckedDowncast<SubDerived>(other->obj());
55 toString(other->obj());