clang/test/Analysis/Checkers/WebKit/template-wrapper-call-arg.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 | struct Obj { |
| 7 | void ref() const; |
| 8 | void deref() const; |
| 9 | |
| 10 | void someFunction(); |
| 11 | }; |
| 12 | |
| 13 | template<typename T> class Wrapper { |
| 14 | public: |
| 15 | T obj(); |
| 16 | }; |
| 17 | |
| 18 | static void foo(Wrapper<Ref<Obj>>&& wrapper) |
| 19 | { |
| 20 | wrapper.obj()->someFunction(); |
| 21 | } |