<div dir="ltr">Thanks for the patch, committed as r225889.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 19, 2014 at 3:25 AM, Stephan Bergmann <span dir="ltr"><<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/19/2014 06:05 AM, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
LGTM, do you need someone to commit this for you?<br>
</blockquote>
<br></span>
yes, please; I don't have commit rights<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On Thu, Dec 18, 2014 at 12:28 AM, Stephan Bergmann <<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a><br></span><span class="">
<mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>>> wrote:<br>
<br>
    On 12/17/2014 08:40 PM, Richard Smith wrote:<br>
<br>
        The right way to write this is:<br>
<br>
        -  if (const EnumType *ET = dyn_cast<EnumType>(T))<br>
        +  if (const EnumType *ET = T->getAs<EnumType>())<br>
<br>
<br>
    updated patch attached<br>
<br>
        On Tue, Dec 16, 2014 at 5:51 AM, Rafael Espíndola<br>
        <<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a> <mailto:<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@<u></u>gmail.com</a>><br></span>
        <mailto:<a href="mailto:rafael.espindola@" target="_blank">rafael.espindola@</a>__<a href="http://gmail.com" target="_blank">gma<u></u>il.com</a><span class=""><br>
        <mailto:<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@<u></u>gmail.com</a>>>> wrote:<br>
<br>
             LGTM.<br>
<br>
             Clang is not my expertise, but the patch looks clearly<br>
        correct, fixes<br>
             a bug and has a testcase.<br>
<br>
<br>
             On 16 December 2014 at 04:49, Stephan Bergmann<br>
        <<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>><br></span><span class="">
             <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>>>><br>
        wrote:<br>
              > ping<br>
              ><br>
              ><br></span><span class="">
              > On 11/25/2014 03:04 PM, Rafael Espíndola wrote:<br>
              >><br>
              >> ccing Richard.<br>
              >> On 25 November 2014 at 03:38, Stephan Bergmann<br>
             <<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>><br></span><span class="">
        <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>>>><br>
              >> wrote:<br>
              >>><br>
              >>> ping<br>
              >>><br>
              >>><br></span><span class="">
              >>> On 11/10/2014 06:18 PM, Stephan Bergmann wrote:<br>
              >>>><br>
              >>>><br>
              >>>> On 10/23/2014 10:41 AM, David Majnemer wrote:<br>
              >>>>><br>
              >>>>><br>
              >>>>> Per the developer policy [1], please add a test case to<br>
             accompany your<br>
              >>>>> change.<br>
              >>>>><br>
              >>>>> [1]<br></span>
        <a href="http://llvm.org/docs/__DeveloperPolicy.html#test-__cases" target="_blank">http://llvm.org/docs/__<u></u>DeveloperPolicy.html#test-__<u></u>cases</a><div><div class="h5"><br>
        <<a href="http://llvm.org/docs/DeveloperPolicy.html#test-cases" target="_blank">http://llvm.org/docs/<u></u>DeveloperPolicy.html#test-<u></u>cases</a>><br>
              >>>>><br>
              >>>>> Looks good otherwise.<br>
              >>>><br>
              >>>><br>
              >>>><br>
              >>>> Attached updated patch including test case.<br>
              >>>><br>
              >>>>> On Thu, Oct 23, 2014 at 12:43 AM, Stephan Bergmann<br>
             <<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>><br>
        <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>>><br>
              >>>>> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a><br>
        <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>> <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a><br>
        <mailto:<a href="mailto:sbergman@redhat.com" target="_blank">sbergman@redhat.com</a>>>><u></u>> wrote:<br>
              >>>>><br>
              >>>>>      [ping]<br>
              >>>>><br>
              >>>>><br>
              >>>>>      On 10/14/2014 04:12 PM, Stephan Bergmann wrote:<br>
              >>>>><br>
              >>>>>              $ clang++ --version<br>
              >>>>>              clang version 3.6.0 (trunk 219190)<br>
              >>>>>              Target: x86_64-unknown-linux-gnu<br>
              >>>>>              Thread model: posix<br>
              >>>>><br>
              >>>>>              $ cat test.cc<br>
              >>>>>              enum class E { e };<br>
              >>>>>              typedef E E2;<br>
              >>>>>              E2 f1() { return E::e; }<br>
              >>>>>              E f2() { return E::e; }<br>
              >>>>>              bool g1() { return !f1(); }<br>
              >>>>>              bool g2() { return !f2(); }<br>
              >>>>><br>
              >>>>>              $ clang++ -std=c++11 -c test.cc<br>
              >>>>>              test.cc:6:20: error: invalid argument<br>
        type 'E'<br>
             to unary<br>
              >>>>>              expression<br>
              >>>>>              bool g2() { return !f2(); }<br>
              >>>>>                                  ^~~~~<br>
              >>>>>              1 error generated.<br>
              >>>>><br>
              >>>>><br>
              >>>>>          rightly complains about the invalid contextual<br>
             conversion to<br>
              >>>>>          bool in g2<br>
              >>>>>          but erroneously not also about the one in g1.<br>
              >>>>><br>
              >>>>>              Index: lib/Sema/SemaExpr.cpp<br>
              >>>>><br>
              >>>>><br>
<br></div></div>
        ==============================<u></u>____==========================<u></u>==__==__=======<span class=""><br>
              >>>>>              --- lib/Sema/SemaExpr.cpp    (revision<br>
        219190)<br>
              >>>>>              +++ lib/Sema/SemaExpr.cpp    (working copy)<br>
              >>>>>              @@ -7414,7 +7414,7 @@<br>
              >>>>>                }<br>
              >>>>><br>
              >>>>>                static bool<br></span>
        isScopedEnumerationType(____<u></u>QualType<span class=""><br>
             T) {<br>
              >>>>>              -  if (const EnumType *ET =<br>
        dyn_cast<EnumType>(T))<br>
              >>>>>              +  if (const EnumType *ET =<br>
              >>>>><br></span>
        dyn_cast<EnumType>(T.____<u></u>getCanonicalType()))<span class=""><br>
              >>>>><br>
              >>>>>                    return ET->getDecl()->isScoped();<br>
              >>>>>                  return false;<br>
              >>>>>                }<br>
              >>>>><br>
              >>>>><br>
              >>>>>          would fix that for me.<br>
<br>
<br>
</span></blockquote>
<br>
</blockquote></div><br></div>