This fixes http://llvm.org/PR31054
I don't know whether that is the correct fix: Are we actually allowed to skip the destructor registration if the static variable is unreachable?
Differential D28505
CGDecl: Skip static variable initializers in unreachable code MatzeB on Jan 9 2017, 5:31 PM. Authored by
Details This fixes http://llvm.org/PR31054 I don't know whether that is the correct fix: Are we actually allowed to skip the destructor registration if the static variable is unreachable?
Diff Detail
Event TimelineComment Actions Yes, this is correct; per [stmt.dcl]/5, the destructor only runs if the object was constructed. |