aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorSean Hunt <scshunt@csclub.uwaterloo.ca>2011-05-06 00:11:07 +0000
committerSean Hunt <scshunt@csclub.uwaterloo.ca>2011-05-06 00:11:07 +0000
commit5f802e51406664ca9b6e0d57fc7ce37ea97a1c65 (patch)
tree092c543a1a637a13e3b418206e5d8622eb91deaa /lib/Parse/ParseDeclCXX.cpp
parent536e9c1f103f3e59ed47e35090819eb93596c35b (diff)
Revert r130912 in order to approach defaulted functions from the other
direction and not introduce things in the wrong place three different times. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 9c464bc248..7247c0724e 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -1648,8 +1648,6 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
ExprResult BitfieldSize;
ExprResult Init;
bool Deleted = false;
- bool Defaulted = false;
- SourceLocation DefLoc;
while (1) {
// member-declarator:
@@ -1681,11 +1679,6 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
Diag(Tok, diag::warn_deleted_function_accepted_as_extension);
ConsumeToken();
Deleted = true;
- } else if (Tok.is(tok::kw_delete)) {
- if (!getLang().CPlusPlus0x)
- Diag(Tok, diag::warn_defaulted_function_accepted_as_extension);
- DefLoc = ConsumeToken();
- Defaulted = true;
} else {
Init = ParseInitializer();
if (Init.isInvalid())
@@ -1717,10 +1710,6 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
ThisDecl = Actions.ActOnFriendFunctionDecl(getCurScope(), DeclaratorInfo,
/*IsDefinition*/ false,
move(TemplateParams));
- if (Defaulted) {
- Diag(DefLoc, diag::err_friends_define_only_namespace_scope);
- ThisDecl->setInvalidDecl();
- }
} else {
ThisDecl = Actions.ActOnCXXMemberDeclarator(getCurScope(), AS,
DeclaratorInfo,
@@ -1728,7 +1717,7 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
BitfieldSize.release(),
VS, Init.release(),
/*IsDefinition*/Deleted,
- Deleted, Defaulted);
+ Deleted);
}
if (ThisDecl)
DeclsInGroup.push_back(ThisDecl);
@@ -1755,7 +1744,6 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
BitfieldSize = 0;
Init = 0;
Deleted = false;
- Defaulted = false;
// Attributes are only allowed on the second declarator.
MaybeParseGNUAttributes(DeclaratorInfo);