Skip to content

Commit 932a480

Browse files
authored
Merge pull request #13251 from compnerd/qual-cast
2 parents e2f90cf + 32ca0fd commit 932a480

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/SourceKit/include/SourceKit/Support/ThreadSafeRefCntPtr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ class ThreadSafeRefCntPtr : ThreadSafeRefCntPtrImpl {
120120
}
121121

122122
operator llvm::IntrusiveRefCntPtr<T>() const {
123-
llvm::sys::ScopedLock L(*getMutex((void*)this));
123+
llvm::sys::ScopedLock L(*getMutex(
124+
reinterpret_cast<void *>(const_cast<ThreadSafeRefCntPtr *>(this))));
124125
llvm::IntrusiveRefCntPtr<T> Ref(Obj.load());
125126
return Ref;
126127
}

0 commit comments

Comments
 (0)