Index: include/llvm/ADT/IntrusiveRefCntPtr.h =================================================================== --- include/llvm/ADT/IntrusiveRefCntPtr.h +++ include/llvm/ADT/IntrusiveRefCntPtr.h @@ -69,8 +69,9 @@ /// refcount, respectively. When a Release() call decrements the refcount to 0, /// the object deletes itself. /// -/// Objects that inherit from RefCountedBase should always be allocated with -/// operator new. +/// Don't mix ownership semantics for a given object - only use Retain if you +/// have exclusive ownership of an object created with 'new', or there are +/// existing Retained ownerships. template class RefCountedBase { mutable unsigned RefCount = 0;