From: Aaron Ballman Date: Thu, 20 Nov 2014 21:34:56 +0000 (+0000) Subject: The Syntax enumeration requires at least three bits to store all of its values. Incre... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=796a6179f890ef4b76428987d382ae37cb188eda;p=clang The Syntax enumeration requires at least three bits to store all of its values. Increase the number of bits for SyntaxUsed. Decrease the number of expression arguments allowed by a single bit so that the bit fields continue to add up to 32-bits evenly. There is no test for this fix because I could find no reasonable way to trigger a visible failure from it. Thanks to Doug Gregor for spotting this! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222456 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/AttributeList.h b/include/clang/Sema/AttributeList.h index 39e7ccd7b2..c8e8625b0c 100644 --- a/include/clang/Sema/AttributeList.h +++ b/include/clang/Sema/AttributeList.h @@ -94,10 +94,10 @@ private: /// The number of expression arguments this attribute has. /// The expressions themselves are stored after the object. - unsigned NumArgs : 16; + unsigned NumArgs : 15; /// Corresponds to the Syntax enum. - unsigned SyntaxUsed : 2; + unsigned SyntaxUsed : 3; /// True if already diagnosed as invalid. mutable unsigned Invalid : 1;