diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-30 23:45:35 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-30 23:45:35 +0000 |
commit | 58196dc06ee27cd4150ef483123e1e3b2c772821 (patch) | |
tree | 42f8735710b4381008bc8c3d36c7cd6405ff65c8 /lib/Parse/ParseTemplate.cpp | |
parent | 863eb53b5c97037874129b33711e0b668ce73975 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | lib/Parse/ParseTemplate.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp index 7b09f8191d..9343f5b733 100644 --- a/lib/Parse/ParseTemplate.cpp +++ b/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. |