[C++20] [Modules] Fix may-be incorrect ADL for module local entities (#123931)
[llvm-project.git] / clang / test / Analysis / Checkers / WebKit / uncounted-obj-const-v-muable.cpp
blob2721cd8474e1b4d78d6f05389c3b4ba2c041a8ca
1 // RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
3 #include "mock-types.h"
5 class Object {
6 public:
7 void ref() const;
8 void deref() const;
10 bool constFunc() const;
11 void mutableFunc();
14 class Caller {
15 void someFunction();
16 void otherFunction();
17 private:
18 RefPtr<Object> m_obj;
21 void Caller::someFunction()
23 m_obj->constFunc();
24 // expected-warning@-1{{Call argument for 'this' parameter is uncounted and unsafe}}
25 m_obj->mutableFunc();
26 // expected-warning@-1{{Call argument for 'this' parameter is uncounted and unsafe}}