From 4572f3b10a437ee87da01aca68a7d92a5575bb83 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Nov 2014 21:34:56 +0000 Subject: [PATCH] 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! llvm-svn: 222456 --- clang/include/clang/Sema/AttributeList.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Sema/AttributeList.h b/clang/include/clang/Sema/AttributeList.h index 39e7ccd..c8e8625 100644 --- a/clang/include/clang/Sema/AttributeList.h +++ b/clang/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; -- 2.7.4