Enable clang plugin "check-enum-unsigned-bitfields" flag by default |
|||||
Issue descriptionhttps://chromium.googlesource.com/chromium/src/+/master/docs/clang.md says to implement all new clang plugins behind a flag for at least one clang roll. The flag check-enum-unsigned-bitfields enables a check for enums used in bitfields. Enum bitfields should use unsigned as the underlying type to prevent strange behavior in MSVC. Design Doc (in context of ComputedStyle): https://docs.google.com/document/d/1BfjMEXIzvY1WZEn_nESBxyqkazkfa0sBSEvm-F89YwM/edit Discussion on style-dev: https://www.google.com/url?hl=en&q=https://groups.google.com/a/chromium.org/d/msgid/style-dev/CADAgNurPp47TyFcws6LAyY%253DAxT5RpRb0MkAWJ_G3J2oL0Uj-mg%2540mail.gmail.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1471065087985000&usg=AFQjCNGjo6xUygkhjxGo90tVmjGrlm6MiA). Allowing enums in bitfields has the advantage of saving space while not having to use static casts when reading from/writing to the bitfield, as well as not having to match the correct underlying type (signed/unsigned) when deciding the field to store.
,
Aug 12 2016
,
Aug 12 2016
,
Aug 12 2016
,
Nov 17 2016
Invalid; now we are implementing this in Clang directly as a path in crbug.com/648462. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sashab@chromium.org
, Aug 12 2016