shafik added a comment.

In D131472#3709684 <https://reviews.llvm.org/D131472#3709684>, @labath wrote:

> Good catch. Lldb should try to be useful even if the debugged program invokes 
> undefined behavior.

Totally agree, for the purposes here there should be no difference for these 
purposes between a scoped enum and an enum without a fixed underlying type.



================
Comment at: lldb/test/API/lang/cpp/const_static_integral_member/main.cpp:52
   const static ScopedEnum invalid_scoped_enum_val = static_cast<ScopedEnum>(5);
+  const static ScopedEnum invalid_scoped_enum_val_2 =
+      static_cast<ScopedEnum>(7);
----------------
I am just going to super nitpick here and say that these are not invalid 
values. When we have a fixed underlying type we are allowed to use the full 
range of the underlying type. The values may be outside the range of the 
enumerators but they are valid values. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131472/new/

https://reviews.llvm.org/D131472

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to