[Issue 21225] preview=dtorfields inserts unnecessary dtor call in nothrow ctors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 5 19:04:09 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21225
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #11692 "Fix 21225 - preview=dtorfields inserts
unnecessary dtor calls..." was merged into master:
- 15caafef20af92469b11cfaaeaf16b4e28e2b1d3 by MoonlightSentinel:
Fix 21225 - preview=dtorfields inserts unnecessary dtor calls...
... in nothrow ctors
Fixed by not inserting the destructor call if the constructor is
`nothrow` - which makes the generated `catch`-block unreachable
(unless the ctor violates it's `nothrow` guarantee - which is UB).
This also saves time & memory spent on generating unused AST elements.
https://github.com/dlang/dmd/pull/11692
--
More information about the Digitalmars-d-bugs
mailing list