summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTemplate.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-11-30 23:45:35 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-11-30 23:45:35 +0000
commitb3041feaf78349f1cb782654dc8c6d842e39289f (patch)
treeec021a76b6560716c2311e4c8fff34601594e95f /clang/lib/Parse/ParseTemplate.cpp
parentef42154c17ccdd7838aa46880ea3d07f5516b886 (diff)
downloadbcm5719-llvm-b3041feaf78349f1cb782654dc8c6d842e39289f.tar.gz
bcm5719-llvm-b3041feaf78349f1cb782654dc8c6d842e39289f.zip
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
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r--clang/lib/Parse/ParseTemplate.cpp14
1 files changed, 0 insertions, 14 deletions
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.
OpenPOWER on IntegriCloud