diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-07 20:56:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-07 20:56:01 +0000 |
commit | 45fa560c72441069d9e4eb1e66efd87349caa552 (patch) | |
tree | f86ce87dabd0fe05e6e06c4edc5312652ab48d09 /lib/Parse/Parser.cpp | |
parent | cf6ba2eeaeabb03541ee98859805800c39759a47 (diff) |
When we notice that a member function is defined with "= delete" or "=
default", make a note of which is used when creating the
initial declaration. Previously, we would wait until later to handle
default/delete as a definition, but this is too late: when adding the
declaration, we already treated the declaration as "user-provided"
when in fact it was merely "user-declared".
Fixes PR10861 and PR10442, along with a bunch of FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 6e84e42968..b4d41ef482 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -876,7 +876,7 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, ParseScope BodyScope(this, Scope::FnScope|Scope::DeclScope); Scope *ParentScope = getCurScope()->getParent(); - D.setFunctionDefinition(true); + D.setFunctionDefinitionKind(FDK_Definition); Decl *DP = Actions.HandleDeclarator(ParentScope, D, move(TemplateParameterLists)); D.complete(DP); |