Files
clang-p2996/clang/test/Analysis/Checkers/WebKit/ref-ptr-accessor.cpp
Ryosuke Niwa 82568046e6 [analyzer] Add the support for calling Ref::ptr accessor. (#80919)
This accessor returns a pointer from Ref type and is therefore safe.
2024-02-12 15:00:12 -08:00

13 lines
275 B
C++

// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncountedCallArgsChecker -verify %s
// expected-no-diagnostics
#include "mock-types.h"
void someFunction(RefCountable*);
void testFunction()
{
Ref item = RefCountable::create();
someFunction(item.ptr());
}