erichkeane added a comment. Mostly Ok with this. The diagnostic seems a little subtle with the mathematical notation... just looking at the diagnostics I was like, "wait, why is 8 NOT included in the range -8, 8.... oh wait". This will be a little shocking to others perhaps?
Also, misisng any tests for the E3, I'd like to see the range for that too. ================ Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast<E1>(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer value 8 is outside the valid range of values [-8, 8) for this enumeration type}} + ---------------- Are we ok with how subtle the `[N, M)` syntax is here? ================ Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2427 + // expected-note@-1 {{integer value 8 is outside the valid range of values [0, 8) for this enumeration type}} + + constexpr E4 x6 = static_cast<E4>(0); ---------------- I see no tests for E3? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130058/new/ https://reviews.llvm.org/D130058 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits