This is an archive of the discontinued LLVM Phabricator instance.

Stop asserting on constexpr explicit MS constructor calls.
Needs ReviewPublic

Authored by t.p.northover on May 26 2017, 3:28 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

When trying to switch to C++14 by default, some extra expressions become constexpr and this is one case we can't handle.

Technically I believe weakening the assert would be enough to fix the problem, but defaulted default constructors are extremely close to being allowed through which would lead to incorrect code (all of isDefaulted, isTrivial and hasFields contribute to the exclusion, as well as the fact that unions don't have default constructors). So I decided to explicitly check that we are dealing with a copy/move before executing that block.

Diff Detail

Event Timeline

t.p.northover created this revision.May 26 2017, 3:28 PM