<div dir="ltr">On Mon, Nov 25, 2013 at 10:27 AM, Alp Toker <span dir="ltr"><<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On 24/11/2013 23:17, Richard Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ // GNU libc++ uses certain MS keywords as identifiers.<br>
<br>
"libc", not "libc++". Maybe specifically say that it uses __uptr, since that's the only one we're special-casing.<br>
<br>
+ if (VendorAttributesAllowed && !getLangOpts().CPlusPlus &&<br>
+ DS.isEmpty() && NextToken().is(tok::semi) &&<br>
+ PP.getSourceManager().<u></u>isInSystemHeader(Loc)) {<br>
<br>
I'm worried about the generality of this check. An abstract-declarator could legitimately contain "T *__uptr", followed by a semicolon.<br>
</blockquote>
<br></div>
Could you come up with an abstract declarator test case that actually ends in (keyword) __uptr followed by a semicolon in C mode? I couldn't.</blockquote><div><br></div><div>I've looked through the C grammar and this appears to be impossible there. There may be cases in Objective-C (or some other extension that we happen to support) but I'm not aware of any.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you pass in D.mayOmitIdentifier(), and treat __uptr as an identifier only if (1) the identifier cannot be omitted, and (2) the next token is a semicolon?<br>
</blockquote>
<br></div>
Sure, let's do this to make the check more robust.<br></blockquote><div><br></div><div>Thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Alp.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Sun, Nov 24, 2013 at 6:43 AM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a> <mailto:<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a><u></u>>> wrote:<br>
<br>
I have no issues with this patch, but I would wait for a LGTM from<br>
someone like Richard. As for merging it into the release branch, that<br>
should be discussed with Bill, and this seems reasonable to apply<br>
there too.<br>
<br>
Thanks!<br>
<br>
~Aaron<br>
<br>
On Sun, Nov 24, 2013 at 7:19 AM, Alp Toker <<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a><br></div><div class="im">
<mailto:<a href="mailto:alp@nuanti.com" target="_blank">alp@nuanti.com</a>>> wrote:<br>
><br>
> On 23/11/2013 21:06, Aaron Ballman wrote:<br>
>><br>
>> On Fri, Nov 22, 2013 at 8:35 PM, Jeremy Fitzhardinge<br></div>
<<a href="mailto:jeremy@goop.org" target="_blank">jeremy@goop.org</a> <mailto:<a href="mailto:jeremy@goop.org" target="_blank">jeremy@goop.org</a>>><div><div class="h5"><br>
>> wrote:<br>
>>><br>
>>> Hi all,<br>
>>><br>
>>> I filed bug 17824 a few days ago because I'm seeing a<br>
regression in the<br>
>>> current svn clang vs previous versions with this structure in<br>
glibc's<br>
>>> /usr/include/stdlib.h when compiling with -fms-extensions:<br>
>><br>
>> This is not actually a bug -- __uptr is a keyword in Microsoft<br>
mode.<br>
>><br>
>> <a href="http://msdn.microsoft.com/en-us/library/vstudio/aa983399.aspx" target="_blank">http://msdn.microsoft.com/en-<u></u>us/library/vstudio/aa983399.<u></u>aspx</a><br>
>><br>
>> We don't support the full semantics for it, but you can see it<br>
>> declared as a TypeAttr in Attr.td.<br>
><br>
><br>
> Hi Aaron,<br>
><br>
> We've been good at supporting all the language standards built<br>
against stock<br>
> system headers so far because it's handy for writing quick tests<br>
and, in<br>
> this case, porting software from Windows.<br>
><br>
> The attached patch fixes -fms-extensions with GNU libc headers.<br>
Could you<br>
> give it a spin against the MS headers?<br>
><br>
> Will land and get this merged to the release branch if it works<br>
for you.<br>
><br>
> Alp.<br>
><br>
><br>
>><br>
>> HTH!<br>
>><br>
>> ~Aaron<br>
>><br>
>> ______________________________<u></u>_________________<br>
>> cfe-dev mailing list<br></div></div>
>> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a> <mailto:<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>><div class="im"><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
><br>
><br>
> --<br>
> <a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
> the browser experts<br>
><br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br></div>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a> <mailto:<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
-- <br>
<a href="http://www.nuanti.com" target="_blank">http://www.nuanti.com</a><br>
the browser experts<br>
<br>
</div></div></blockquote></div><br></div></div>