aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-07-23 05:45:25 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-07-23 05:45:25 +0000
commiteab9d6f9065b042d39fbaf9842c9d8cc968dd6d0 (patch)
treeae1948b1996d0c59ea4f597701504ea5e8caa25c /lib/Parse/ParseDeclCXX.cpp
parent3fe52ff7df93f7a928a15cc2cbf5134fdc0cec15 (diff)
Add diagnostics for comma at end of enum and for extra semicolon at namespace
scope to -Wc++11-extensions. Move extra semicolon after member function definition diagnostic out of -pedantic, since C++ allows a single semicolon there. Keep it in -Wextra-semi, though, since it's still questionable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 8e357f7e42..3dc96cf0d2 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -1984,7 +1984,7 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
// Consume the ';' - it's optional unless we have a delete or default
if (Tok.is(tok::semi))
- ConsumeExtraSemi(AfterDefinition);
+ ConsumeExtraSemi(AfterMemberFunctionDefinition);
return;
}
@@ -2334,8 +2334,7 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc,
// Check for extraneous top-level semicolon.
if (Tok.is(tok::semi)) {
- ConsumeExtraSemi(InsideStruct,
- DeclSpec::getSpecifierName((DeclSpec::TST)TagType));
+ ConsumeExtraSemi(InsideStruct, TagType);
continue;
}
@@ -3060,8 +3059,7 @@ void Parser::ParseMicrosoftIfExistsClassDeclaration(DeclSpec::TST TagType,
// Check for extraneous top-level semicolon.
if (Tok.is(tok::semi)) {
- ConsumeExtraSemi(InsideStruct,
- DeclSpec::getSpecifierName((DeclSpec::TST)TagType));
+ ConsumeExtraSemi(InsideStruct, TagType);
continue;
}