From 200de97087452f533fed840b83dff0f0625595eb Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Tue, 3 Mar 2020 23:45:29 +0100 Subject: [PATCH] SList::Init: add missing constructor (#33096) SList::Init uses an assignment operator that doesn't exist. Because this template class method doesn't get used during default compilation, most compilers don't detect the issue. clang 10 detects the issue and gives an error. --- src/coreclr/src/inc/slist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/inc/slist.h b/src/coreclr/src/inc/slist.h index f11ec229865..f5d03126f9f 100644 --- a/src/coreclr/src/inc/slist.h +++ b/src/coreclr/src/inc/slist.h @@ -160,13 +160,13 @@ public: void Init() { LIMITED_METHOD_CONTRACT; - m_pHead = &m_link; + m_pHead = PTR_SLink(&m_link); // NOTE :: fHead variable is template argument // the following code is a compiled in, only if the fHead flag // is set to false, if (!fHead) { - m_pTail = &m_link; + m_pTail = PTR_SLink(&m_link); } }