Modify some deleted function methods to better reflect reality:
- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)
This fixes the bug that we weren't catching
void foo() = delete;
void foo() {}
as being a redefinition.
llvm-svn: 131013
This commit is contained in:
@@ -79,7 +79,7 @@ namespace {
|
||||
MEnd = D->decls_end();
|
||||
M != MEnd; ++M)
|
||||
if (CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(*M))
|
||||
if (Method->isThisDeclarationADefinition() &&
|
||||
if (Method->doesThisDeclarationHaveABody() &&
|
||||
(Method->hasAttr<UsedAttr>() ||
|
||||
Method->hasAttr<ConstructorAttr>()))
|
||||
Builder->EmitTopLevelDecl(Method);
|
||||
|
||||
Reference in New Issue
Block a user