<div dir="ltr">I think this is something the compiler should catch. I'm writing a generalized warning in clang for it right now.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 13, 2017 at 12:57 PM, Vladimir Voskresensky via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Reid,<br>
    <br>
    May be it's worth to have the same assert for
    clang::DeclSpec::TypeSpecType?<br>
    <br>
    Thanks,<br>
    Vladimir.<div><div class="h5"><br>
    <br>
    <div class="m_-153245685904042596moz-cite-prefix">On 13.03.2017 21:59, Reid Kleckner via
      cfe-dev wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Thanks, fixed in r297654.</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Mar 13, 2017 at 10:35 AM,
          Vladimir Voskresensky via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank"></a><a class="m_-153245685904042596moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello
            Clang Developers,<br>
            <br>
            in file clang/Basic/Specifiers.h there is<br>
               struct clang::WrittenBuiltinSpecs {<br>
                 /*DeclSpec::TST*/ unsigned Type  : 5; // << must
            be *6*<br>
            ....<br>
              };<br>
            <br>
            "Type" field must be 6 to match DeclSpec::TST which is the
            same as enum TypeSpecifierType<br>
            which has<br>
             TST_error // erroneous type<br>
            with value 43 which can not be kept in 5 bits field.<br>
            <br>
            as a correct example you can see that<br>
            clang::DeclSpec::TypeSpecType field is 6 bits<br>
            <br>
            So, we corrupt values  during save in
            clang::DeclSpec::SaveWrittenBu<wbr>iltinSpecs for all after
            TST_image1d_t.<br>
            Btw, due to this TST_error is changed to TST_float128....<br>
            <br>
            Hope it helps,<br>
            Vladimir.<br>
            ______________________________<wbr>_________________<br>
            cfe-dev mailing list<br>
            <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
            <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="m_-153245685904042596mimeAttachmentHeader"></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
cfe-dev mailing list
<a class="m_-153245685904042596moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a class="m_-153245685904042596moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>