[all-commits] [llvm/llvm-project] c6ed82: [ADT] Fix incorrect const parent ptr type in ilist...
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Wed Jun 19 11:53:02 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c6ed8289b7c948464855841632f6b6783da1b65a
https://github.com/llvm/llvm-project/commit/c6ed8289b7c948464855841632f6b6783da1b65a
Author: Stephen Tozer <stephen.tozer at sony.com>
Date: 2024-06-19 (Wed, 19 Jun 2024)
Changed paths:
M llvm/include/llvm/ADT/ilist_base.h
M llvm/include/llvm/ADT/ilist_iterator.h
M llvm/include/llvm/ADT/ilist_node.h
M llvm/include/llvm/ADT/ilist_node_base.h
M llvm/include/llvm/ADT/ilist_node_options.h
M llvm/unittests/ADT/IListIteratorTest.cpp
M llvm/unittests/ADT/IListNodeBaseTest.cpp
M llvm/unittests/ADT/IListNodeTest.cpp
Log Message:
-----------
[ADT] Fix incorrect const parent ptr type in ilist (#96059)
Fixes issue reported in: https://github.com/llvm/llvm-project/pull/94224
The recent commit above added an ilist_parent<ParentTy> option, which
added a parent pointer to the ilist_node_base type for the list. The
const methods for returning that parent pointer however were incorrectly
implemented, returning `const ParentPtrTy`, which is equivalent to
`ParentTy * const` rather than `const ParentTy *`. This patch fixes this
by passing around `ParentTy` in ilist's internal logic rather than
`ParentPtrTy`, removing the ability to have a `void*` parent pointer but
cleanly fixing this error.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list