Chris Lattner
0046de17e5
Fix a couple of suboptimalities in error recovery.
...
1. In the top level of ParseStatementOrDeclaration, don't eat a } if we
just parsed a statement if it list there. Also, don't even bother
emitting an error about a missing semicolon if the statement had a
bug (an rbrace is fine).
2. In do/while parsing, don't require a 'while' to be present if the do
body didn't parse.
This allows us to generate a clean diagnostic for this code:
t.c:1:22: error: expected expression
void foo (void) { do . while (0); }
^
Thanks to Neil for pointing this out.
llvm-svn: 59256
2008-11-13 18:52:53 +00:00
..
2008-10-31 08:56:51 +00:00
2007-01-27 06:23:34 +00:00
2007-10-11 00:18:28 +00:00
2007-01-25 07:42:11 +00:00
2008-05-27 23:32:43 +00:00
2008-10-20 04:57:38 +00:00
2007-10-11 00:18:28 +00:00
2008-09-02 18:04:36 +00:00
2008-08-28 19:20:44 +00:00
2008-05-27 02:01:50 +00:00
2008-01-04 18:04:52 +00:00
2007-01-23 01:32:33 +00:00
2007-10-11 00:18:28 +00:00
2007-10-11 00:18:28 +00:00
2007-12-05 18:16:33 +00:00
2008-01-02 19:17:38 +00:00
2007-10-11 00:18:28 +00:00
2007-10-11 00:18:28 +00:00
2008-06-12 12:40:02 +00:00
2007-02-13 01:52:09 +00:00
2008-08-16 19:45:32 +00:00
2008-11-08 15:40:37 +00:00
2008-09-09 20:56:12 +00:00
2008-10-29 00:13:59 +00:00
2008-11-11 11:37:55 +00:00
2008-09-05 11:26:19 +00:00
2008-10-06 00:07:55 +00:00
2008-11-11 06:13:16 +00:00
2008-10-26 23:22:23 +00:00
2007-10-04 20:19:06 +00:00
2007-12-11 18:34:51 +00:00
2007-11-13 20:50:37 +00:00
2007-12-27 20:29:42 +00:00
2007-08-27 01:01:57 +00:00
2007-10-11 00:18:28 +00:00
2007-10-11 00:18:28 +00:00
2007-10-11 00:18:28 +00:00
2007-10-11 00:18:28 +00:00
2008-02-17 19:31:09 +00:00
2007-09-05 19:52:07 +00:00
2007-10-12 16:34:10 +00:00
2007-10-12 16:34:10 +00:00
2007-10-11 23:42:27 +00:00
2008-01-17 20:33:24 +00:00
2008-01-04 00:27:46 +00:00
2008-02-01 06:57:39 +00:00
2008-02-01 06:57:39 +00:00
2008-06-21 21:44:18 +00:00
2008-10-26 23:29:41 +00:00
2008-09-19 17:44:00 +00:00
2008-01-02 18:09:46 +00:00
2008-01-10 18:10:31 +00:00
2008-09-26 04:48:09 +00:00
2008-05-23 11:19:39 +00:00
2007-10-11 18:08:47 +00:00
2008-05-09 06:41:27 +00:00
2007-10-11 00:18:28 +00:00
2007-10-11 00:18:28 +00:00
2007-10-11 00:18:28 +00:00
2008-10-04 19:45:56 +00:00
2008-09-26 04:48:09 +00:00
2007-07-24 21:46:40 +00:00
2008-06-12 12:40:02 +00:00
2008-04-20 19:07:56 +00:00
2008-08-20 22:07:34 +00:00
2007-10-18 00:38:23 +00:00
2008-11-13 18:52:53 +00:00
2007-01-23 20:16:22 +00:00
2008-05-20 12:55:29 +00:00
2008-01-04 18:04:52 +00:00
2006-08-15 05:11:49 +00:00