Add a function which asserts if it is used.
Categories
(Core :: MFBT, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp)
References
Details
(Whiteboard: [sp3])
Attachments
(1 file)
While dealing with template, I had one specialization over 3 of of the code, which would never be used in practice. The template specialization is worth keeping as it is hundreds of lines long and help guarantee that the code would remain identical across the specializations.
However, having this third specialization which should never be used in practice implies that we have to implement fake-implementation of various functions, to assert if these functions are ever called with the third specialization.
Unfortunately, this conflicts with other requirements we added in the past to ensure the lack of undefined behavior of top of C++ usage.
This bug is about adding an alternative to MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE()
which works in the case of constructor initialization list, where a field is required to be initialized, but no sensible value exists to be used as a placeholder.
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Comment 3•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Updated•2 years ago
|
Description
•