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)
(deleted),
text/x-phabricator-request
|
Details |
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•1 year ago
|
||
Updated•1 year ago
|
Pushed by npierron@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c944bf501c2c Add mozilla::MakeCompilerAssumeUnreachableFakeValue to abort if ever used. r=arai
Comment 3•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Updated•1 year ago
|
Description
•