[all-commits] [llvm/llvm-project] 143863: [LLDB] Remove undefined behavior in TestConstStati...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Mon Aug 8 19:25:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1438639a2f7eb9e9cba01454d3a9b1b16d179c9a
      https://github.com/llvm/llvm-project/commit/1438639a2f7eb9e9cba01454d3a9b1b16d179c9a
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2022-08-08 (Mon, 08 Aug 2022)

  Changed paths:
    M lldb/test/API/lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py
    M lldb/test/API/lang/cpp/const_static_integral_member/main.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list