diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-13 18:52:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-13 18:52:53 +0000 |
commit | 195044028b76133e2a1f245b094468fe07db7330 (patch) | |
tree | ae41b55d8e9022bd9e2d67690e90a6ee770d83e2 /lib/Analysis/LiveVariables.cpp | |
parent | 23cd0d994f39300c9eed013afaec99b8cde2a65c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59256 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/LiveVariables.cpp')
0 files changed, 0 insertions, 0 deletions