[PATCH] D130301: [Clang] Fix how we set the NumPositiveBits on an E numDecl to cover the case of single enumerator with value zero or an empty enum

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 25 06:40:31 PDT 2022


erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

1 more question, otherwise this looks right to me.



================
Comment at: compiler-rt/test/ubsan/TestCases/Misc/enum.cpp:27
+  return ((int)e1 != -1) & ((int)e2 != -1) &
+         // CHECK: error: load of value <unknown>, which is not a valid value for type 'enum EBool'
+         ((int)e3 != -1) & ((int)e4 == 1) &
----------------
What does THIS come from?  What value is unknown?  Shouldn't the -1 be fine?


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

https://reviews.llvm.org/D130301



More information about the cfe-commits mailing list