[LLDB] Remove undefined behavior in TestConstStaticIntegralMember.py
authorShafik Yaghmour <shafik.yaghmour@intel.com>
Tue, 9 Aug 2022 02:23:53 +0000 (19:23 -0700)
committerShafik Yaghmour <shafik.yaghmour@intel.com>
Tue, 9 Aug 2022 02:23:53 +0000 (19:23 -0700)
commit1438639a2f7eb9e9cba01454d3a9b1b16d179c9a
treea639ed40a2cb7634b8006441a0c5f78c533017a5
parent03e345b5198d22ac7a4fd9798010fd1da16a25ca
[LLDB] Remove undefined behavior in TestConstStaticIntegralMember.py

Setting an enum without a fixed underlying type to a value which is outside the
value range is undefined behavior.

The initializer needs to be a constant expression and therefore this was always
ill-formed we just were not diagnosing it before.

See D130058 and D131307 for more details.

Differential Revision: https://reviews.llvm.org/D131460
lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py
lldb/test/API/lang/cpp/const_static_integral_member/main.cpp