Commit 25200ab2 by Mark Mitchell Committed by Mark Mitchell

* spew.c (yylex): Correct handling of friends.

From-SVN: r39990
parent 515edc9b
2001-02-22 Mark Mitchell <mark@codesourcery.com>
* spew.c (yylex): Correct handling of friends.
2001-02-22 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_encoding): Pass write_function_type the
FUNCTION_DECL for the function being encoded.
(write_function_type): Pass it along to write_bare_function_type.
......
......@@ -719,6 +719,8 @@ yylex ()
{
int yychr;
int old_looking_for_typename = 0;
int just_saw_new = 0;
int just_saw_friend = 0;
timevar_push (TV_LEX);
......@@ -804,13 +806,13 @@ yylex ()
}
/* do_aggr needs to know if the previous token was `friend'. */
else if (nth_token (0)->yylval.ttype == ridpointers[RID_FRIEND])
after_friend = 1;
just_saw_friend = 1;
break;
case NEW:
/* do_aggr needs to know if the previous token was `new'. */
after_new = 1;
just_saw_new = 1;
break;
case TYPESPEC:
......@@ -824,7 +826,6 @@ yylex ()
case AGGR:
do_aggr ();
after_friend = after_new = 0;
break;
case ENUM:
......@@ -836,6 +837,9 @@ yylex ()
break;
}
after_friend = just_saw_friend;
after_new = just_saw_new;
/* class member lookup only applies to the first token after the object
expression, except for explicit destructor calls. */
if (yychr != '~')
......
// Build don't link:
// Origin: robt@flyingpig.com
class Outer
{
friend void f1();
class Inner2;
};
class Outer::Inner2
{
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment