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
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 8e357f7..3dc96cf 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -1984,7 +1984,7 @@
// 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 @@
// 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 @@
// Check for extraneous top-level semicolon.
if (Tok.is(tok::semi)) {
- ConsumeExtraSemi(InsideStruct,
- DeclSpec::getSpecifierName((DeclSpec::TST)TagType));
+ ConsumeExtraSemi(InsideStruct, TagType);
continue;
}