<div class="gmail_quote">On Mon, Feb 27, 2012 at 6:21 AM, Benjamin Kramer <span dir="ltr"><<a href="mailto:benny.kra@googlemail.com" target="_blank">benny.kra@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>On 26.02.2012, at 23:15, Eli Friedman wrote:<br>
> On Sun, Feb 26, 2012 at 8:55 AM, Benjamin Kramer<br>
> <<a href="mailto:benny.kra@googlemail.com" target="_blank">benny.kra@googlemail.com</a>> wrote:<br>
>> Author: d0k<br>
>> Date: Sun Feb 26 10:55:55 2012<br>
>> New Revision: 151494<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=151494&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=151494&view=rev</a><br>
>> Log:<br>
>> Bit pack ExtProtoInfo.<br>
>><br>
>> Modified:<br>
>> cfe/trunk/include/clang/AST/Type.h<br>
>><br>
>> Modified: cfe/trunk/include/clang/AST/Type.h<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=151494&r1=151493&r2=151494&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Type.h?rev=151494&r1=151493&r2=151494&view=diff</a><br>
>> ==============================================================================<br>
>> --- cfe/trunk/include/clang/AST/Type.h (original)<br>
>> +++ cfe/trunk/include/clang/AST/Type.h Sun Feb 26 10:55:55 2012<br>
>> @@ -2699,15 +2699,15 @@<br>
>> struct ExtProtoInfo {<br>
>> ExtProtoInfo() :<br>
>> Variadic(false), HasTrailingReturn(false), ExceptionSpecType(EST_None),<br>
>> - TypeQuals(0), RefQualifier(RQ_None), NumExceptions(0), Exceptions(0),<br>
>> + RefQualifier(RQ_None), TypeQuals(0), NumExceptions(0), Exceptions(0),<br>
>> NoexceptExpr(0), ConsumedArguments(0) {}<br>
>><br>
>> FunctionType::ExtInfo ExtInfo;<br>
>> - bool Variadic;<br>
>> - bool HasTrailingReturn;<br>
>> - ExceptionSpecificationType ExceptionSpecType;<br>
>> + bool Variadic : 1;<br>
>> + bool HasTrailingReturn : 1;<br>
>> + ExceptionSpecificationType ExceptionSpecType : 4;<br>
>> + RefQualifierKind RefQualifier : 2;<br>
><br>
> Are you sure this won't cause issues with MSVC? It handles enums in<br>
</div></div>> bitfields in a non-standard way…<br>
<br>
The bit fields should be wide enough not to be affected by MSVC's sign extension weirdness. And the buildbot is still green.<br></blockquote><div><br></div><div>Chad has observed an MSVC buildbot failure <span>between r151468 and r151514. The RefQualifier bitfield isn't wide enough to avoid the sign extension issue: RefQualifierKind has 3 distinct values. (Takumi's MSVC10 buildbot is green, though, so maybe MSVC10 fixes the signed enum bitfield bug?)</span></div>
<div><span><br></span></div><div><span>I've increased that bitfield to 3 bits in r151544. Hopefully that'll fix the issue.</span></div><div><br></div><div>- Richard</div></div>