[cfe-commits] Small patch

Anis Ahmad anis.ahmad.oss at gmail.com
Tue Jun 16 23:16:05 PDT 2009


Ah yes, I forgot about emitting a reasonable diagnostic.  How's this?  I
wasn't sure what the best behavior was after the error was detected, so I
just allowed it to continue parsing.  Let me know if that's incorrect.

-- Anis Ahmad

On Mon, Jun 15, 2009 at 9:07 AM, Douglas Gregor <dgregor at apple.com> wrote:

>
> On Jun 11, 2009, at 8:33 AM, Anis Ahmad wrote:
>
>
>> While familiarizing myself with the code, I noticed a comment to fix the
>> handling of namespace aliases by ensuring no attributes were specified for
>> the namespace (as per the spec).  Unless I'm deeply mistaken, it seemed like
>> it could be handled by a simple refactor.
>>
>
> While this patch does fix the problem, the error message we get ("expected
> '{'") isn't very good. I would prefer if we parse both the attribute and
> then the "=", but emit a diagnostic that states explicitly that attributes
> are not permitted on namespace aliases. That will give the user a much
> better understanding of what went wrong.
>
>        - Doug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090616/f070f243/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: namespaceattralias.diff
Type: application/octet-stream
Size: 2079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090616/f070f243/attachment.obj>


More information about the cfe-commits mailing list