Skip to content

Commit

Permalink
SList::Init: add missing constructor (dotnet#33096)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tmds authored Mar 3, 2020
1 parent 15f607b commit 200de97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/src/inc/slist.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ class SList
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);
}
}

Expand Down

0 comments on commit 200de97

Please sign in to comment.