[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
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 22 15:47:23 PDT 2022
shafik added inline comments.
================
Comment at: compiler-rt/test/ubsan/TestCases/Misc/enum.cpp:10
+enum class EBool : bool { a = 1 } e3;
+enum EEmpty {};
----------------
erichkeane wrote:
> can you do a test on:
>
> `enum ENeg { a = -1 }`
> ?
>
> That should ALSO have only a single bit.
Added this test and it indeed only has one bit.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130301/new/
https://reviews.llvm.org/D130301
More information about the cfe-commits
mailing list