From b3041feaf78349f1cb782654dc8c6d842e39289f Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 30 Nov 2011 23:45:35 +0000 Subject: Revert most of r145372 for now. Lookahead beyond the ';' in a function declaration tickles a bug in the way we handle visibility pragmas. The improvement to error recovery for template function definitions declared with the 'typedef' specifier in r145372 is unrelated and not reverted here. llvm-svn: 145541 --- clang/lib/Parse/ParseTemplate.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'clang/lib/Parse/ParseTemplate.cpp') diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index 7b09f8191d2..9343f5b733a 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -240,20 +240,6 @@ Parser::ParseSingleDeclarationAfterTemplate( return 0; } - // Check for a stray semicolon in a function definition. - if (DeclaratorInfo.isFunctionDeclarator() && Tok.is(tok::semi) && - Context == Declarator::FileContext) { - const Token &Next = NextToken(); - if (Next.is(tok::l_brace) || Next.is(tok::kw_try) || - Next.is(tok::equal) || Next.is(tok::colon)) { - SourceLocation SemiLoc = ConsumeToken(); - Diag(SemiLoc, diag::err_stray_semi_function_definition) - << FixItHint::CreateRemoval(SemiLoc); - assert(!isDeclarationAfterDeclarator() && - isStartOfFunctionDefinition(DeclaratorInfo)); - } - } - // If we have a declaration or declarator list, handle it. if (isDeclarationAfterDeclarator()) { // Parse this declaration. -- cgit v1.2.3