This is an archive of the discontinued LLVM Phabricator instance.

Prevent Scoped Enums from being Integral constant expressions:
ClosedPublic

Authored by erichkeane on Jul 20 2018, 7:46 AM.

Details

Summary

Discovered because of: https://bugs.llvm.org/show_bug.cgi?id=38235

It seems to me that a scoped enum should NOT be an integral constant expression
without a cast, so this seems like a sensical change. I very much want to hear
from a Core person however (@rsmith :) ).

Diff Detail

Repository
rL LLVM

Event Timeline

erichkeane created this revision.Jul 20 2018, 7:46 AM
rsmith accepted this revision.Jul 20 2018, 10:40 AM

Seems fine to me (assuming we still accept the places that are supposed to allow a scoped enum, such as a case label).

This revision is now accepted and ready to land.Jul 20 2018, 10:40 AM
This revision was automatically updated to reflect the committed changes.