[cfe-commits] Small patch

Eli Friedman eli.friedman at gmail.com
Tue Jun 16 23:35:58 PDT 2009


On Tue, Jun 16, 2009 at 11:16 PM, Anis Ahmad<anis.ahmad.oss at gmail.com> wrote:
>
> 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.

That's reasonable in this case, since it's the most straightforward
way to recover.

The test should probably go into test/Parser rather than test/CXX/...;
it's not testing functionality in the standard.  Also, in case you
haven't figured it out, the way to make -verify work in this case is
to put something like the following at the end of the line with the
error:

namespace B __attribute__ (( static )) = A; //
expected-error{{unexpected attribute specifiers in namespace alias}}

The usual code style around here is two-space indentation, no braces
around single-line if statements, and no "!= 0" in an if condition
testing a pointer; otherwise, I think the patch looks fine.

Oh, and on a side note, please try to avoid top-posting.

-Eli




More information about the cfe-commits mailing list