]> granicus.if.org Git - clang/commit
Modify some deleted function methods to better reflect reality:
authorSean Hunt <scshunt@csclub.uwaterloo.ca>
Fri, 6 May 2011 20:44:56 +0000 (20:44 +0000)
committerSean Hunt <scshunt@csclub.uwaterloo.ca>
Fri, 6 May 2011 20:44:56 +0000 (20:44 +0000)
commit10620eb5164e31208fcbf0437cd79ae535ed0559
tree50d63ef0fcdc9a227a849acbbf89855128ac34bc
parentd4b9ee3b6ad82843c55909d6499232fce530113e
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
include/clang/AST/Decl.h
include/clang/AST/DeclCXX.h
lib/AST/ASTContext.cpp
lib/AST/Decl.cpp
lib/AST/DeclPrinter.cpp
lib/AST/DumpXML.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/ModuleBuilder.cpp
lib/Frontend/ASTConsumers.cpp
lib/Index/CallGraph.cpp
lib/Index/Indexer.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaTemplateInstantiate.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
lib/Serialization/ASTReaderDecl.cpp
lib/Serialization/ASTWriterDecl.cpp
lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
lib/StaticAnalyzer/Core/CXXExprEngine.cpp
test/SemaCXX/deleted-function.cpp
tools/libclang/CIndex.cpp