Skip to content

Commit 89004f9

Browse files
committed
Fix the tests
1 parent bc318db commit 89004f9

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

clang/test/Analysis/Checkers/WebKit/mock-types.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,19 @@ template <typename T> struct RefPtr {
9595
t->ref();
9696
}
9797
RefPtr(Ref<T>&& o)
98-
: t(o.leafkRef())
98+
: t(o.leakRef())
9999
{ }
100100
RefPtr(RefPtr&& o)
101101
: t(o.t)
102102
{
103103
o.t = nullptr;
104104
}
105+
RefPtr(const RefPtr& o)
106+
: t(o.t)
107+
{
108+
if (t)
109+
t->ref();
110+
}
105111
~RefPtr() {
106112
if (t)
107113
t->deref();

clang/test/Analysis/Checkers/WebKit/ref-cntbl-crtp-base-no-virtual-dtor.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,6 @@ template<typename Out, typename... In> Function<Out(In...)> adopt(Detail::Callab
6161
return Function<Out(In...)>(impl, Function<Out(In...)>::Adopt);
6262
}
6363

64-
template<typename T, typename PtrTraits = RawPtrTraits<T>, typename RefDerefTraits = DefaultRefDerefTraits<T>> Ref<T, PtrTraits, RefDerefTraits> adoptRef(T&);
65-
66-
template<typename T, typename _PtrTraits, typename RefDerefTraits>
67-
inline Ref<T, _PtrTraits, RefDerefTraits> adoptRef(T& reference)
68-
{
69-
return Ref<T, _PtrTraits, RefDerefTraits>(reference);
70-
}
71-
7264
enum class DestructionThread : unsigned char { Any, Main, MainRunLoop };
7365
void ensureOnMainThread(Function<void()>&&); // Sync if called on main thread, async otherwise.
7466
void ensureOnMainRunLoop(Function<void()>&&); // Sync if called on main run loop, async otherwise.

0 commit comments

Comments
 (0)