<div dir="ltr">It was found by the suite and I just committed more tests.<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 28, 2013 at 4:07 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">testcase?<br>
<div class="HOEnZb"><div class="h5"><br>
On 28 March 2013 15:15, Reid Kleckner <<a href="mailto:reid@kleckner.net">reid@kleckner.net</a>> wrote:<br>
> Author: rnk<br>
> Date: Thu Mar 28 17:15:11 2013<br>
> New Revision: 178297<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=178297&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=178297&view=rev</a><br>
> Log:<br>
> [sema] Check the result of getAsCXXRecordDecl() to fix the build<br>
><br>
> I'm not 100% sure what should happen here to find the real<br>
> CXXRecordDecl.<br>
><br>
> Modified:<br>
>     cfe/trunk/lib/Sema/SemaType.cpp<br>
><br>
> Modified: cfe/trunk/lib/Sema/SemaType.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=178297&r1=178296&r2=178297&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=178297&r1=178296&r2=178297&view=diff</a><br>

> ==============================================================================<br>
> --- cfe/trunk/lib/Sema/SemaType.cpp (original)<br>
> +++ cfe/trunk/lib/Sema/SemaType.cpp Thu Mar 28 17:15:11 2013<br>
> @@ -1733,12 +1733,12 @@ QualType Sema::BuildMemberPointerType(Qu<br>
>    // when passing pointers between TUs that disagree about the size.<br>
>    if (Context.getTargetInfo().getCXXABI().isMicrosoft()) {<br>
>      CXXRecordDecl *RD = Class->getAsCXXRecordDecl();<br>
> -    if (!RD->hasAttr<MSInheritanceAttr>()) {<br>
> +    if (!RD || !RD->hasAttr<MSInheritanceAttr>()) {<br>
>        // Lock in the inheritance model on the first use of a member pointer.<br>
>        // Otherwise we may disagree about the size at different points in the TU.<br>
>        // FIXME: MSVC picks a model on the first use that needs to know the size,<br>
>        // rather than on the first mention of the type, e.g. typedefs.<br>
> -      if (RequireCompleteType(Loc, Class, 0) && !RD->isBeingDefined()) {<br>
> +      if (RequireCompleteType(Loc, Class, 0) && RD && !RD->isBeingDefined()) {<br>
>          // We know it doesn't have an attribute and it's incomplete, so use the<br>
>          // unspecified inheritance model.  If we're in the record body, we can<br>
>          // figure out the inheritance model.<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div></div>