This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Prevent using member declaration diagnostic if the base class is invalid.
ClosedPublic

Authored by EricWF on Oct 10 2016, 2:33 AM.

Details

Summary

Once a base class has been made invalid (by a static_assert for example) all using-member declarations in the derived classes will result in a "not a base class" diagnostic. This diagnostic is very misleading and should not be emitted.

This change is needed to help libc++ produce reasonable diagnostics in std::optional and std::variant.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 74110.Oct 10 2016, 2:33 AM
EricWF retitled this revision from to [Sema] Prevent using member declaration diagnostic if the base class is invalid..
EricWF updated this object.
EricWF added reviewers: rsmith, majnemer, aaron.ballman.
EricWF added a subscriber: cfe-commits.
EricWF updated this revision to Diff 74112.Oct 10 2016, 2:39 AM

Simplify test case.

aaron.ballman accepted this revision.Oct 10 2016, 7:32 AM
aaron.ballman edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Oct 10 2016, 7:32 AM
EricWF closed this revision.Oct 10 2016, 7:35 AM