check-webkit-style should allow "bool a : 1"
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 22:57:40 +0000 (22:57 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Mar 2015 22:57:40 +0000 (22:57 +0000)
commitf75ca406b937ca27a3e4c2328df4ffafd1a99152
tree71c64ec5050d864a666f224194505bce5ea859e0
parent3da48ce80653a3b1bb8920899d2e4008936aae9f
check-webkit-style should allow "bool a : 1"
https://bugs.webkit.org/show_bug.cgi?id=142794

Reviewed by Brent Fulgham.

We should allow member bitfields of the form:

bool m_var : 1;

It seems that Visual Studio 8 was the last compiler that
wasn't happy about not using unsigned here. We already have
about 500 cases (in WebCore) where people were ignoring this rule.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_language): Allow "bool".
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Add tests.
(CppStyleTest.test_enum_bitfields):
(CppStyleTest.test_plain_integral_bitfields):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/style/checkers/cpp.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py