revert a hunk of code that Argiris added in r106213, which is the

root cause of PR7481 and probably more, and has no apparent 
testcases.  I don't understand the logic here so I can't repair it.

llvm-svn: 108119
This commit is contained in:
Chris Lattner 2010-07-12 01:48:28 +00:00
parent 01c5a15dde
commit 0931644922
2 changed files with 7 additions and 10 deletions

View File

@ -127,16 +127,7 @@ SourceLocation Parser::MatchRHSPunctuation(tok::TokenKind RHSTok,
}
Diag(Tok, DID);
Diag(LHSLoc, diag::note_matching) << LHSName;
if (!SkipUntil(RHSTok)) {
// We stopped before finding a RHS token, e.g. we encountered a ';'.
// Balance Paren/Brace/Bracket counting.
switch (RHSTok) {
default: break;
case tok::r_paren : assert(ParenCount > 0); --ParenCount; break;
case tok::r_brace : assert(BraceCount > 0); --BraceCount; break;
case tok::r_square: assert(BracketCount > 0); --BracketCount; break;
}
}
SkipUntil(RHSTok);
return R;
}

View File

@ -0,0 +1,6 @@
// RUN: not %clang_cc1 -fsyntax-only %s
// PR7481
struct{
a
}