Skip to content
Commit b3645353 authored by Shafik Yaghmour's avatar Shafik Yaghmour
Browse files

[Clang] Diagnose ill-formed constant expression when setting a non fixed enum...

[Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

DR2338 clarified that it was undefined behavior to set the value outside the
range of the enumerations values for an enum without a fixed underlying type.

We should diagnose this with a constant expression context.

Differential Revision: https://reviews.llvm.org/D130058
parent 58526b2d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment