[PATCH] D23466: ADT: Remove UB in ilist (and use a circular linked list)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 13 16:37:36 PDT 2016
> On Aug 13, 2016, at 2:54 PM, Duncan P. N. Exon Smith via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
>
>> On 2016-Aug-12, at 17:31, Duncan P. N. Exon Smith via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>>>
>>> ================
>>> Comment at: include/llvm/ADT/ilist.h:324
>>> @@ -424,7 +323,3 @@
>>>
>>> - iplist() : Head(this->provideInitialHead()) {}
>>> - ~iplist() {
>>> - if (!Head) return;
>>> - clear();
>>> - Traits::destroySentinel(getTail());
>>> - }
>>> + iplist() = default;
>>> + ~iplist() { clear(); }
>>> ----------------
>>> Could be removed?
>>
>> Certainly the destructor needs to stay. I'll remove the default constructor if it still compiles (but I'm always wary about what will or will not compile on MSVC...)
>
> BTW, this didn't compile without `iplist() = default`.
Interesting, what was the reason?
—
Mehdi
More information about the llvm-commits
mailing list