Explicitly mark some enums as unsigned

This allows casting from and to any unsigned value, previously this was
undefined behavior.

This fixes ubsan complaining in `TParseContext::layoutQualifierCheck`,
where `~EShLangComputeMask` is used.
This commit is contained in:
Sebastian Neubauer 2020-05-08 13:52:18 +02:00
parent b5f003d7a3
commit 91ac60fc52
2 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,7 @@
// Don't maintain an ordinal set of enums (0,1,2,3...) to avoid all possible
// defects from mixing the two different forms.
//
typedef enum {
typedef enum : unsigned {
EBadProfile = 0,
ENoProfile = (1 << 0), // only for desktop, before profiles showed up
ECoreProfile = (1 << 1),